From 5674d1a1868368431270ec5c70b5c21638903fa0 Mon Sep 17 00:00:00 2001 From: jiangjunjie Date: Mon, 28 Sep 2026 14:25:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=B7=9F=E5=BD=93=E5=89=8D=E5=AF=B9=E8=AF=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/chat-content.vue | 72 ++++++++++++++++----------------- src/components/text-content.vue | 19 ++++++++- src/components/text-folding.vue | 3 +- 3 files changed, 55 insertions(+), 39 deletions(-) diff --git a/src/components/chat-content.vue b/src/components/chat-content.vue index 0a364a0..fe4f5ba 100644 --- a/src/components/chat-content.vue +++ b/src/components/chat-content.vue @@ -295,7 +295,7 @@
- +
@@ -396,7 +396,7 @@
- +
@@ -459,7 +459,7 @@
- +
@@ -476,7 +476,7 @@
- +
@@ -527,9 +527,9 @@ --> - + :disabled="isHistory"> @@ -566,12 +566,12 @@ 'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ', }"> - + :disabled="isHistory">
@@ -619,9 +619,9 @@
如需更多帮助,请点击。
--> - + :disabled="isHistory">
@@ -655,9 +655,9 @@
如需更多帮助,请点击。
--> - + :disabled="isHistory">
@@ -680,9 +680,9 @@
如需更多帮助,请点击。
--> - + :disabled="isHistory"> @@ -701,9 +701,9 @@
如需更多帮助,请点击。
--> - + :disabled="isHistory"> @@ -732,8 +732,8 @@
如需更多帮助,请点击。
--> - @@ -753,13 +753,13 @@ 'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ', }"> - + :disabled="isHistory" heightMax="autoHeight">
@@ -790,13 +790,13 @@ 'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ', }"> - + :disabled="isHistory" heightMax="autoHeight">
@@ -881,9 +881,9 @@
如需更多帮助,请点击。
--> - + :disabled="isHistory" heightMax="autoHeight">
@@ -1016,11 +1016,11 @@
- + :disabled="isHistory">
@@ -1038,12 +1038,12 @@ 'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ', }"> - @@ -1076,13 +1076,13 @@ 'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ', }"> - + :disabled="isHistory" heightMax="autoHeight">
diff --git a/src/components/text-content.vue b/src/components/text-content.vue index 353d45b..5c02e3d 100644 --- a/src/components/text-content.vue +++ b/src/components/text-content.vue @@ -49,6 +49,7 @@ const props = defineProps({ disabled: { type: Boolean, default: false }, heightMax: { type: String, default: '' }, itemlist: { type: Object, default: () => ({}) }, + isHistory: { type: Boolean, default: false }, }) const store = inject('appStore', null) @@ -252,6 +253,23 @@ function handleURL(url, params) { function replacementRagEmoticon(str) { str = str || '' let res = str.replace(/\\n/gm, '
') + // 历史消息里的内嵌跳转链接置为禁用态(与 text-folding 行为一致) + if (props.isHistory) { + if (res.indexOf('open-wx-web-button')) { + res = res.replace(/"open-wx-web-button"/g, '"open-wx-web-button-disable"') + } else if (res.indexOf('jump-web-button')) { + res = res.replace(/"jump-web-button"/g, '"jump-web-button-disable"') + } else if (res.indexOf('open-app-page-button')) { + res = res.replace(/"open-app-page-button"/g, '"open-app-page-button-disable"') + } + if (res.indexOf('open-wx-web')) { + res = res.replace(/"open-wx-web"/g, '"open-wx-web-disable"') + } else if (res.indexOf('jump-web')) { + res = res.replace(/"jump-web"/g, '"jump-web-disable"') + } else if (res.indexOf('open-app-page')) { + res = res.replace(/"open-app-page"/g, '"open-app-page-disable"') + } + } return emojiToImage(res) } @@ -429,7 +447,6 @@ function manualAnswer(event, item) { } .answer-items[disabled] { - opacity: 0.5; cursor: not-allowed; } diff --git a/src/components/text-folding.vue b/src/components/text-folding.vue index cbab0c3..d493eb2 100644 --- a/src/components/text-folding.vue +++ b/src/components/text-folding.vue @@ -26,7 +26,7 @@ " >