From d11650d3431fbe0dd2437fe07b14695d5b9099f5 Mon Sep 17 00:00:00 2001 From: jmal Date: Wed, 20 May 2020 14:22:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=97=B6=E5=85=88=E5=8F=96=E6=B6=88=E9=80=89=E6=8B=A9=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E7=A7=BB=E9=99=A4=E9=80=89=E4=B8=AD=E7=9A=84=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShowFile/ShowFile.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 170dd99..743887b 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -2295,17 +2295,27 @@ fileIds: fileIds }).then(() => { // 移除列表 + let removeFileIndexList = [] if(this.$refs.fileListTable.tableSelectData.length > 0){ this.$refs.fileListTable.tableSelectData.forEach(item => { let fileIndex = this.fileList.findIndex(file => file.id === item.id) if(fileIndex > -1){ - this.fileList.splice(fileIndex,1) + removeFileIndexList.push(fileIndex) } }) } + // 先清空之前选择的数据 this.$refs.fileListTable.doLayout() - this.$refs.fileListTable.clearSelection()// 删除后清空之前选择的数据 + this.$refs.fileListTable.clearSelection() this.$refs.fileListTable.tableSelectData = [] + const that = this + setTimeout(function () { + // 再执行移除 + removeFileIndexList.forEach(fileIndex => { + that.fileList.splice(fileIndex,1) + }) + },300) + }).then(()=>{ this.$notify({ title: '删除成功',