From 85a77761594917a64d3334727efdaf8b66106a12 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 30 Apr 2024 13:37:47 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E4=B8=AD=E7=9A=84=E5=BE=85=E5=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/pages/manage/components/DialogWrapper.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index c8c4d601b..6ccfb6459 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -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}`) });