修复清空表单时图片/文件组件未清空的问题。

master
vdpAdmin 2021-12-09 15:34:34 +08:00
parent 5497382aea
commit dfedbdad4b
1 changed files with 7 additions and 2 deletions

View File

@ -412,11 +412,16 @@ export default {
resetField() {
let defaultValue = this.field.options.defaultValue
//this.disableChangeValidate() /* 禁用字段校验 */
this.setValue(defaultValue)
this.$nextTick(() => {
//this.enableChangeValidate() /* 开启字段校验 */
//
})
//清空上传组件文件列表
if ((this.field.type === 'picture-upload') || (this.field.type === 'file-upload')) {
this.$refs['fieldEditor'].clearFiles()
this.fileList.splice(0, this.fileList.length)
}
},
setWidgetOption(optionName, optionValue) { //通用组件选项修改API