|
@@ -84,7 +84,7 @@
|
|
|
<div
|
|
|
class="message-content-text"
|
|
|
v-if="item.type === 'text'"
|
|
|
- v-text="_parseText(item.msg)"
|
|
|
+ v-html="_parseText(item.msg)"
|
|
|
></div>
|
|
|
<!-- 图片 -->
|
|
|
<div
|
|
@@ -424,9 +424,9 @@ export default {
|
|
|
const regex2 = /\[(.+?)\]/g;
|
|
|
const codeList = text.match(regex2)
|
|
|
console.log('[]',text.match(regex2))
|
|
|
- let html = null
|
|
|
+ let html = text
|
|
|
codeList.map((item,i) => {
|
|
|
- html = text.replace(item, "<img style='width: 20px; height: 20px;vertical-align: sub;' src='" +
|
|
|
+ html = html.replace('/' + item +'/g', "<img style='width: 20px; height: 20px;vertical-align: sub;' src='" +
|
|
|
this.getIconPic(item) +
|
|
|
"' unicode = '" +
|
|
|
item +
|