fix(ProjectAttachment): 优化附件删除逻辑

- 在删除其他附件时,同时从 allFiles 中移除对应文件
- 移除删除附件后不必要的重新获取附件列表操作
This commit is contained in:
dj
2025-06-25 15:38:22 +08:00
parent a451f7481e
commit 41a455338f

View File

@@ -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()
}
});
}