|
|
|
@ -441,6 +441,15 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
type();
|
|
|
|
|
},
|
|
|
|
|
parseMarkdown(markdown) {
|
|
|
|
|
// 简单转换
|
|
|
|
|
let html = marked(markdown || "");
|
|
|
|
|
|
|
|
|
|
// 基础安全处理(可选)
|
|
|
|
|
html = html.replace(/<script.*?>.*?<\/script>/gi, "");
|
|
|
|
|
|
|
|
|
|
return html;
|
|
|
|
|
},
|
|
|
|
|
scrollToBottom() {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.scrollToView = "msg" + (this.messages.length - 1);
|
|
|
|
|