perf: 优化更新聊天中的待办

This commit is contained in:
kuaifan 2024-04-30 13:37:47 +08:00
parent 875da9fbe5
commit 85a7776159

View File

@ -3128,6 +3128,10 @@ export default {
}
if (listElement.classList.contains('dialog-view')) {
const dataId = listElement.getAttribute("data-id")
const dataMsg = this.allMsgs.find(item => item.id == dataId) || {}
if (dataMsg.userid != this.userId) {
return;
}
const dataIndex = [].indexOf.call(el.querySelectorAll(target.tagName), target);
if (dataClass === 'checked') {
target.setAttribute('data-list', 'unchecked')
@ -3149,7 +3153,12 @@ export default {
}).then(({data}) => {
this.$store.dispatch("saveDialogMsg", data);
}).catch(({msg}) => {
$A.modalError(msg);
if (dataClass === 'checked') {
target.setAttribute('data-list', 'checked')
} else {
target.setAttribute('data-list', 'unchecked')
}
$A.modalError(msg)
}).finally(_ => {
this.$store.dispatch("cancelLoad", `msg-${dataId}`)
});