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