diff --git a/docs/zh/components/highlight.md b/docs/zh/components/highlight.md index 275f0bca..3ccaa892 100644 --- a/docs/zh/components/highlight.md +++ b/docs/zh/components/highlight.md @@ -5,6 +5,11 @@ | 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 | | --- | --- | --- | --- | --- | --- | | code | 代码字符串 | 非 | String | | console.log('you lost code prop') | +| format | 是否格式化 HTML | 非 | Boolean | | false | + +::: tip +format 建议只在内容为 HTML 的时候打开,如果内容不是 HTML,设置为 true 会有负面效果 +::: ## 示例 diff --git a/src/components/core/d2-highlight/index.vue b/src/components/core/d2-highlight/index.vue index 6eec67a9..47be614a 100644 --- a/src/components/core/d2-highlight/index.vue +++ b/src/components/core/d2-highlight/index.vue @@ -5,6 +5,7 @@