askbot-dragon 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
<div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && !(msg.recommend&& msg.recommend.status)">
|
|
4
4
|
<!-- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p>-->
|
|
5
5
|
<template v-if="msgContent(msg.content)">
|
|
6
|
-
<p
|
|
6
|
+
<p style="white-space: pre-wrap;">
|
|
7
|
+
{{msgHtmlContent(msg.content)}}
|
|
8
|
+
</p>
|
|
7
9
|
</template>
|
|
8
10
|
<template v-else>
|
|
9
11
|
<p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
|
|
@@ -11,7 +13,9 @@
|
|
|
11
13
|
</div>
|
|
12
14
|
<div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && (msg.recommend&& msg.recommend.status)">
|
|
13
15
|
<template v-if="msgContent(msg.content)">
|
|
14
|
-
<p
|
|
16
|
+
<p style="white-space: pre-wrap;">
|
|
17
|
+
{{msgHtmlContent(msg.content)}}
|
|
18
|
+
</p>
|
|
15
19
|
</template>
|
|
16
20
|
<template v-else>
|
|
17
21
|
<p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
|
|
@@ -204,11 +208,15 @@
|
|
|
204
208
|
this.$emit('onImageClick',url)
|
|
205
209
|
},
|
|
206
210
|
msgContent(content){
|
|
207
|
-
let msg = content.
|
|
211
|
+
let msg = content.replaceAll('<br/>',"\n");
|
|
208
212
|
var reg = /<[^>]+>/g;
|
|
209
213
|
return reg.test(msg);
|
|
210
214
|
|
|
211
|
-
}
|
|
215
|
+
},
|
|
216
|
+
msgHtmlContent(content){
|
|
217
|
+
let msg = content.replaceAll('<br/>','\n');
|
|
218
|
+
return msg
|
|
219
|
+
},
|
|
212
220
|
},
|
|
213
221
|
watch:{
|
|
214
222
|
isOpen:{
|