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 @@ " >