From acf5e7885ddfd589627f51b65c9ad874d91b4950 Mon Sep 17 00:00:00 2001 From: linju Date: Mon, 30 Oct 2023 19:51:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=9C=A8Safari=20?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=8B=E7=9A=84=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chat/SliceMsgToLastMsg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/chat/SliceMsgToLastMsg.js b/pages/chat/SliceMsgToLastMsg.js index 49ae543..70629d0 100644 --- a/pages/chat/SliceMsgToLastMsg.js +++ b/pages/chat/SliceMsgToLastMsg.js @@ -27,7 +27,7 @@ export default class SliceMsgToLastMsg { return //console.log('被终止'); } this.sliceMsgIng = true - const msgsArr = this.msgs.split(/(?<=\p{Script=Han})|(?=\p{Script=Han})/gu); + const msgsArr = this.msgs.match(/[\p{Script=Han}]|[^\p{Script=Han}]+/gu); let msg = msgsArr.reverse().pop() // console.log('msg', msg); // 更新最后一条消息的内容 -- GitLab