From 4bf7d376b27208f4d4f2e64c4e990ebd07fea991 Mon Sep 17 00:00:00 2001 From: vdpAdmin Date: Thu, 9 Feb 2023 13:27:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90=E7=9A=84=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E8=B7=AF=E5=BE=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form-widget/field-widget/file-upload-widget.vue | 4 ++++ src/components/form-designer/index.vue | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/form-designer/form-widget/field-widget/file-upload-widget.vue b/src/components/form-designer/form-widget/field-widget/file-upload-widget.vue index e840ba2..f77804b 100644 --- a/src/components/form-designer/form-widget/field-widget/file-upload-widget.vue +++ b/src/components/form-designer/form-widget/field-widget/file-upload-widget.vue @@ -207,9 +207,13 @@ this.updateFieldModelAndEmitDataChangeForUpload(fileList, customResult, res) if (!!customResult && !!customResult.name) { file.name = customResult.name + } else { + file.name = file.name || res.name || res.fileName || res.filename } if (!!customResult && !!customResult.url) { file.url = customResult.url + } else { + file.url = file.url || res.url } this.fileList = deepClone(fileList) this.uploadBtnHidden = fileList.length >= this.field.options.limit diff --git a/src/components/form-designer/index.vue b/src/components/form-designer/index.vue index 0af5eb2..3e77f32 100644 --- a/src/components/form-designer/index.vue +++ b/src/components/form-designer/index.vue @@ -47,7 +47,7 @@ - + @@ -284,6 +284,7 @@ } if (modifiedFlag) { + this.$refs.formRef.clearWidgetRefList() this.designer.emitHistoryChange() } }