From 301291d594a0083a4557daefc80ffed6a8a46031 Mon Sep 17 00:00:00 2001 From: "396572590@qq.com" Date: Tue, 5 Jul 2022 16:11:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20There=20is=20no=20way=20the,=20bug=20#5?= =?UTF-8?q?6300=20=E4=BC=81=E4=B8=9A=E6=A0=87=E5=87=86-=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=9A=84=E9=99=84=E4=BB=B6=20=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=8F=90=E4=BA=A4=EF=BC=8C=E5=86=8D=E6=AC=A1=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=96=87=E4=BB=B6=E6=B2=A1=E5=88=A0=E9=99=A4=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CustomFormComponents/File.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/CustomFormComponents/File.vue b/src/components/CustomFormComponents/File.vue index 278d37d52..4dc120d31 100644 --- a/src/components/CustomFormComponents/File.vue +++ b/src/components/CustomFormComponents/File.vue @@ -256,6 +256,23 @@ export default { const index = this.$refs.importFileAboutStand.uploadFiles.findIndex(e => e.response.data.id === file.response.data.id); this.$refs.importFileAboutStand.uploadFiles.splice(index, 1); this.showFileList.splice(index, 1) + const value = this.value + let ids = value.split(',') + if (file.response) { + let fileIds = file.response.data.id + let newIdList = this.removeArray(ids, fileIds) + let newStr = '' + if (newIdList != null && newIdList.length > 0) { + for (let i = 0; i < newIdList.length; i++) { + if (newIdList[i] !== '') { + newStr += newIdList[i] + ',' + } + } + this.$emit('input', newStr) + } else { + this.$emit('input', '') + } + } }, // 修改 handleModifyName(file) {