修复文件上传组件生成的下载路径问题。

This commit is contained in:
vdpAdmin 2023-02-09 13:27:31 +08:00
parent 5d61682431
commit 4bf7d376b2
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -47,7 +47,7 @@
</el-header>
<el-main class="form-widget-main">
<el-scrollbar class="container-scroll-bar" :style="{height: scrollerHeight}">
<v-form-widget :designer="designer" :form-config="designer.formConfig">
<v-form-widget :designer="designer" :form-config="designer.formConfig" ref="formRef">
</v-form-widget>
</el-scrollbar>
</el-main>
@ -284,6 +284,7 @@
}
if (modifiedFlag) {
this.$refs.formRef.clearWidgetRefList()
this.designer.emitHistoryChange()
}
}