dates 时 清空默认值 切换显示类型报错修复

This commit is contained in:
TTTTian 2024-06-05 03:22:58 +00:00
parent cf706a9e5b
commit 0176ea21af
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@
this.fieldModel = [this.fieldModel]
}
if (val !== 'dates' && oldVal === 'dates'){
this.fieldModel = this.fieldModel[0]
this.fieldModel = this.fieldModel ? this.fieldModel[0] : null
}
},
}

View File

@ -26,7 +26,7 @@
this.optionModel.defaultValue = [this.optionModel.defaultValue]
}
if (val !== 'dates' && oldVal === 'dates'){
this.optionModel.defaultValue = this.optionModel.defaultValue[0]
this.optionModel.defaultValue = this.optionModel.defaultValue ? this.optionModel.defaultValue[0] : null
}
},
}