Просмотр исходного кода

Merge branch 'dev' of http://git.izouma.com/xiongzhu/raex_front into dev

yuanyuan 3 лет назад
Родитель
Сommit
bb81b25c6f
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      src/components/ChatInfo.vue

+ 2 - 1
src/components/ChatInfo.vue

@@ -13,7 +13,7 @@
                     :width="imgWidth"
                     :height="imgHeight"
                 ></van-image>
-                <div class="chat-message" v-else-if="type === 'text'">{{ body.msg }}</div>
+                <div class="chat-message" v-else-if="type === 'text'" v-html="body.msg"></div>
                 <van-image
                     :src="attach.url"
                     @click="preview(attach.url)"
@@ -96,6 +96,7 @@ const body = computed(() => {
             _back = { msg: props.info.body.toString() };
         }
     }
+    _back.msg = _back.msg.replace(/\n/g, '<br/>');
 
     return _back;
 });