From 2cce05442d0aeae8e8e69c6e6f73216102a9678d Mon Sep 17 00:00:00 2001 From: clay <20932067@zju.edu.cn> Date: Thu, 6 Jan 2022 16:06:11 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ebts-ui/src/views/utils/uploadFile.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/ebts-ui/src/views/utils/uploadFile.vue b/ebts-ui/src/views/utils/uploadFile.vue index ed267bf..8d22f60 100644 --- a/ebts-ui/src/views/utils/uploadFile.vue +++ b/ebts-ui/src/views/utils/uploadFile.vue @@ -60,10 +60,10 @@ export default { FileUpload }, props: { - // value: { - // type: String, - // default: "", - // }, + value: { + type: String, + default: "", + }, /** * 文件类型 图片:image 文件:file */ @@ -110,7 +110,7 @@ export default { fileAddr: "", unionId: this.unionId, }, - staticUrl: "", + staticUrl: this.value, // 文件夹列表 folderOptions: [], // 角色列表 @@ -125,12 +125,14 @@ export default { } }, created() { - getRoleAll().then(res => { - this.roleOptions = res.data - }) - getFolder().then(res => { - this.folderOptions = res.data - }) + if (this.vPublic === null){ + getRoleAll().then(res => { + this.roleOptions = res.data + }) + getFolder().then(res => { + this.folderOptions = res.data + }) + } }, methods: { /** @@ -151,6 +153,7 @@ export default { */ changeAddress(addr) { this.form.fileAddr = addr + this.uploadFile(); }, uploadFile() { let flag = false