editor chat

This commit is contained in:
skyboy 2024-07-25 16:36:29 +08:00
parent 954943a750
commit f668f4b738

View file

@ -2,8 +2,8 @@
import { onMounted, inject, ref, nextTick, watch } from "vue";
import { useLocalChatStore } from "@/stores/localchat";
import { formatChatTime } from "@/util/common";
import Vditor from "vditor";
import "vditor/dist/index.css";
// import Vditor from "vditor";
// import "vditor/dist/index.css";
import { ElScrollbar } from "element-plus";
import { System } from "@/system";
const sys:any = inject<System>("system");
@ -38,7 +38,9 @@ watch(
);
function replaceIconTags(text:any) {
// {**}
text = Vditor.md2html(text);
// console.log(text)
// text = Vditor.md2html(text);
// console.log(text)
const regex = /\{\-(.*?)\-\}/g;
// 使replace