mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-11 17:28:22 +00:00
perf: 优化更新聊天中的待办
This commit is contained in:
parent
875da9fbe5
commit
85a7776159
@ -3128,6 +3128,10 @@ export default {
|
|||||||
}
|
}
|
||||||
if (listElement.classList.contains('dialog-view')) {
|
if (listElement.classList.contains('dialog-view')) {
|
||||||
const dataId = listElement.getAttribute("data-id")
|
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);
|
const dataIndex = [].indexOf.call(el.querySelectorAll(target.tagName), target);
|
||||||
if (dataClass === 'checked') {
|
if (dataClass === 'checked') {
|
||||||
target.setAttribute('data-list', 'unchecked')
|
target.setAttribute('data-list', 'unchecked')
|
||||||
@ -3149,7 +3153,12 @@ export default {
|
|||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
this.$store.dispatch("saveDialogMsg", data);
|
this.$store.dispatch("saveDialogMsg", data);
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
$A.modalError(msg);
|
if (dataClass === 'checked') {
|
||||||
|
target.setAttribute('data-list', 'checked')
|
||||||
|
} else {
|
||||||
|
target.setAttribute('data-list', 'unchecked')
|
||||||
|
}
|
||||||
|
$A.modalError(msg)
|
||||||
}).finally(_ => {
|
}).finally(_ => {
|
||||||
this.$store.dispatch("cancelLoad", `msg-${dataId}`)
|
this.$store.dispatch("cancelLoad", `msg-${dataId}`)
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user