fix: 文件:列表模式右键后已选内容会错乱修复

This commit is contained in:
韦荣超 2022-02-18 18:40:39 +08:00
parent 4a72b7f089
commit aa8a094383

View File

@ -1332,6 +1332,18 @@ export default {
handleTableSelect(selection, row) {
this.selectFile = selection;
this.fileChecked = [];
if (this.selectFile.length > 0) {
for (let i = 0; i < this.selectFile.length; i++) {
this.fileChecked[this.selectFile[i].id] = true;
}
}
for (let i = 0; i < this.fileList.length; i++) {
if (this.fileChecked[this.fileList[i].id] === true)
this.fileList[i]["_checked"] = true;
else
this.fileList[i]["_checked"] = false;
}
//
this.shearFiles = [];
},