From 1b33f2fec7e0a1276ca9f09f59bdf905ac9141ba Mon Sep 17 00:00:00 2001 From: kuaifan Date: Tue, 7 Feb 2023 04:33:45 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E6=89=93=E5=BC=80=E4=BC=9A=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/store/actions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js index 9c1156526..501b60b62 100644 --- a/resources/assets/js/store/actions.js +++ b/resources/assets/js/store/actions.js @@ -2193,8 +2193,10 @@ export default { search_msg_id = dialog_id.search_msg_id; dialog_id = dialog_id.dialog_id; } - state.dialogSearchMsgId = /^\d+$/.test(search_msg_id) ? search_msg_id : 0; - state.dialogId = /^\d+$/.test(dialog_id) ? dialog_id : 0; + requestAnimationFrame(_ => { + state.dialogSearchMsgId = /^\d+$/.test(search_msg_id) ? search_msg_id : 0; + state.dialogId = /^\d+$/.test(dialog_id) ? dialog_id : 0; + }) }, /**