From dfedbdad4bcdbebfcef119eca699bdfe2174bcda Mon Sep 17 00:00:00 2001 From: vdpAdmin Date: Thu, 9 Dec 2021 15:34:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=85=E7=A9=BA=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E6=97=B6=E5=9B=BE=E7=89=87/=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=9C=AA=E6=B8=85=E7=A9=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form-designer/form-widget/field-widget/fieldMixin.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/form-designer/form-widget/field-widget/fieldMixin.js b/src/components/form-designer/form-widget/field-widget/fieldMixin.js index 127f0ba..ebaa682 100644 --- a/src/components/form-designer/form-widget/field-widget/fieldMixin.js +++ b/src/components/form-designer/form-widget/field-widget/fieldMixin.js @@ -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