refactor view date
parent
f5f07c88f6
commit
c6aaffe77a
|
@ -2186,15 +2186,11 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
viewDate() {
|
viewDate() {
|
||||||
let propValue = this.modelValue;
|
let propValue = this.modelValue;
|
||||||
if (typeof propValue === 'string') {
|
|
||||||
return new Date();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (propValue && Array.isArray(propValue)) {
|
if (propValue && Array.isArray(propValue)) {
|
||||||
propValue = propValue[0];
|
propValue = propValue[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (propValue) {
|
if (propValue && typeof propValue !== 'string') {
|
||||||
return propValue;
|
return propValue;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue