fix(ProjectAttachment): 优化附件删除逻辑
- 在删除其他附件时,同时从 allFiles 中移除对应文件 - 移除删除附件后不必要的重新获取附件列表操作
This commit is contained in:
@@ -186,10 +186,10 @@ const deleteSingleFile = (row) => {
|
||||
localStorage.setItem(`implementAllFileList-${route.query.projectId}`, JSON.stringify(finalList))
|
||||
} else {
|
||||
otherAttachmentList.value.splice(otherAttachmentList.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||
allFiles.value.splice(allFiles.value.findIndex((item) => item.fileId === row.fileId), 1);
|
||||
}
|
||||
|
||||
getAttachmentList()
|
||||
activeName.value = 'all'
|
||||
// getAttachmentList()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user