askbot-dragon 1.0.12 → 1.0.14
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
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="association-intention">
|
|
3
3
|
<div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && !(msg.recommend&& msg.recommend.status)">
|
|
4
|
-
<p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p
|
|
4
|
+
<!-- <p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)"></p>-->
|
|
5
|
+
<template v-if="msgContent(msg.content)">
|
|
6
|
+
<p>{{msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)}}</p>
|
|
7
|
+
</template>
|
|
8
|
+
<template v-else>
|
|
9
|
+
<p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
|
|
10
|
+
</template>
|
|
5
11
|
</div>
|
|
6
12
|
<div v-if=" (msgType === 'answer_welcofmetext' || msgType === 'answer_text') && (msg.recommend&& msg.recommend.status)">
|
|
7
|
-
<
|
|
13
|
+
<template v-if="msgContent(msg.content)">
|
|
14
|
+
<p>{{msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)}}</p>
|
|
15
|
+
</template>
|
|
16
|
+
<template v-else>
|
|
17
|
+
<p v-html="msg.content.replace(/\#[\u4E00-\u9FA5]{1,3}\;/gi, emotion)" class="answer-rich-text"></p>
|
|
18
|
+
</template>
|
|
8
19
|
<Recommend :msg="msg" @onRadioClickReco="onRadioClickReco"></Recommend>
|
|
9
20
|
</div>
|
|
10
21
|
<div v-if="msg.type === 'answer_rich_text' && !(msg.content.recommend && msg.content.recommend.status)">
|
|
@@ -192,6 +203,12 @@
|
|
|
192
203
|
onImageClick(url){
|
|
193
204
|
this.$emit('onImageClick',url)
|
|
194
205
|
},
|
|
206
|
+
msgContent(content){
|
|
207
|
+
let msg = content.replace('<br/>',"\n");
|
|
208
|
+
var reg = /<[^>]+>/g;
|
|
209
|
+
return reg.test(msg);
|
|
210
|
+
|
|
211
|
+
}
|
|
195
212
|
},
|
|
196
213
|
watch:{
|
|
197
214
|
isOpen:{
|
|
@@ -1972,7 +1972,6 @@ export default {
|
|
|
1972
1972
|
if(this.workOrderDestail && !this.verificationDescription()) {
|
|
1973
1973
|
return
|
|
1974
1974
|
}
|
|
1975
|
-
console.log(this.workOrderDestail);
|
|
1976
1975
|
for (let i=0;i<this.formShow.form.formFieldRelation.length;i++)
|
|
1977
1976
|
{
|
|
1978
1977
|
if(this.formShow.form.formFieldRelation[i].formField.type==='CASCADER')
|
|
@@ -2790,6 +2789,9 @@ export default {
|
|
|
2790
2789
|
let uploadList = d.getElementsByClassName('ask-component-placeholder-container')
|
|
2791
2790
|
if (uploadList) {
|
|
2792
2791
|
for (let index = 0; index < uploadList.length; index++) {
|
|
2792
|
+
if(!uploadList[index].childNodes[0] || !uploadList[index].childNodes[0].getAttribute) {
|
|
2793
|
+
break
|
|
2794
|
+
}
|
|
2793
2795
|
if (uploadList[index].childNodes[0].getAttribute('type') == 'upload' || uploadList[index].childNodes[0].getAttribute('type') == 'undefined') {
|
|
2794
2796
|
this.uploadImgQueue = true
|
|
2795
2797
|
let text = uploadList[index].innerText.replace('正在上传...', '')
|
|
@@ -59,9 +59,11 @@ class MyUploadAdapter {
|
|
|
59
59
|
for(let child of children){
|
|
60
60
|
for (let index = 0; index < child._children._nodes.length; index++) {
|
|
61
61
|
if(child._children._nodes[index].name == 'askComponentPlaceholderContainer'){
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
if(child._children._nodes[index]._children._nodes[0]) {
|
|
63
|
+
this.editor.model.change(writer => {
|
|
64
|
+
writer.remove(child._children._nodes[index]._children._nodes[0]);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
}
|