update
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-10-23 16:12:42 +08:00
parent 42ce9ac63b
commit 0a31cc3d2f
22 changed files with 318 additions and 257 deletions

View File

@@ -3,7 +3,7 @@ import { getRandomId } from "utils/functions"
export function useMermaid() {
// 渲染状态
const renderError = ref<string | null>(null)
// 动态导入 mermaid
let mermaid: any = null
@@ -22,7 +22,10 @@ export function useMermaid() {
}
// 渲染流程图的函数
const renderFlowchart = async (container: HTMLElement | null, mermaidCode: string) => {
const renderFlowchart = async (
container: HTMLElement | null,
mermaidCode: string,
) => {
try {
renderError.value = null
@@ -37,7 +40,9 @@ export function useMermaid() {
}
} catch (error) {
renderError.value =
error instanceof Error ? error.message : "流程图渲染失败,请检查代码格式"
error instanceof Error
? error.message
: "流程图渲染失败,请检查代码格式"
}
}