File tree 1 file changed +6
-2
lines changed
src/views/chat/components/Message
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -81,20 +81,24 @@ function addCopyEvents() {
81
81
})
82
82
}
83
83
}
84
+
84
85
function removeCopyEvents() {
85
86
if (textRef .value ) {
86
87
const copyBtn = textRef .value .querySelectorAll (' .code-block-header__copy' )
87
88
copyBtn .forEach ((btn ) => {
88
- btn .removeEventListener (' click' , () => { })
89
+ btn .removeEventListener (' click' , () => {})
89
90
})
90
91
}
91
92
}
93
+
92
94
onMounted (() => {
93
95
addCopyEvents ()
94
96
})
97
+
95
98
onUpdated (() => {
96
99
addCopyEvents ()
97
100
})
101
+
98
102
onUnmounted (() => {
99
103
removeCopyEvents ()
100
104
})
@@ -104,7 +108,7 @@ onUnmounted(() => {
104
108
<div class =" text-black" :class =" wrapClass" >
105
109
<div ref =" textRef" class =" leading-relaxed break-words" >
106
110
<div v-if =" !inversion" class =" flex items-end" >
107
- <div v-if =" !asRawText" class =" markdown-body" :class =" { 'markdown-body-generate': loading }" v-html =" text" />
111
+ <div v-if =" !asRawText" class =" w-full markdown-body" :class =" { 'markdown-body-generate': loading }" v-html =" text" />
108
112
<div v-else class =" w-full whitespace-pre-wrap" v-text =" text" />
109
113
</div >
110
114
<div v-else class =" whitespace-pre-wrap" v-text =" text" />
You can’t perform that action at this time.
0 commit comments