diff --git a/Debate_front/src/components/ArgumentCom.vue b/Debate_front/src/components/ArgumentCom.vue index a6681de..14e250c 100644 --- a/Debate_front/src/components/ArgumentCom.vue +++ b/Debate_front/src/components/ArgumentCom.vue @@ -441,6 +441,15 @@ export default { }; type(); }, + parseMarkdown(markdown) { + // 简单转换 + let html = marked(markdown || ""); + + // 基础安全处理(可选) + html = html.replace(/.*?<\/script>/gi, ""); + + return html; + }, scrollToBottom() { this.$nextTick(() => { this.scrollToView = "msg" + (this.messages.length - 1);