diff --git a/frontend/src/components/doc-content.vue b/frontend/src/components/doc-content.vue index 56ab1718..bb0a6131 100644 --- a/frontend/src/components/doc-content.vue +++ b/frontend/src/components/doc-content.vue @@ -172,7 +172,7 @@ const checkImage = (url) => { img.src = url; }); }; -renderer.image = function (href: string, title: string | null, text: string) { +renderer.image = function ({href, title, text}) { if (!isValidImageURL(href)) { return `
${t('error.invalidImageLink')}
`; } @@ -185,7 +185,7 @@ renderer.image = function (href: string, title: string | null, text: string) { }; // 自定义代码块渲染器,只显示语言标签 -renderer.code = function (text: string, lang?: string) { +renderer.code = function ({text, lang}) { // Mermaid 图表处理 if (lang === 'mermaid') { // 生成唯一ID