@@ -145,8 +145,12 @@ export default {
};
},
watch: {
- result(){
- this.scrollToBottom()
+ result:{
+ deep: true,
+ handler(n, o) {
+ this.scrollToBottom()
+
+ }
}
computed: {},
@@ -147,7 +147,6 @@ export default {
formattedText(text) {
- console.log(text)
// 将<br>替换为<p>标签
let html = text.replace(/<br>/gi, '</p><p>').replace(/^<p>|<\/p>$/gi, '')
return html;