From a780f48f58a8eea9bf6cd64231c6ba9743533d9d Mon Sep 17 00:00:00 2001 From: liyang <1711467488@qq.com> Date: Wed, 18 Jul 2018 00:11:13 +0800 Subject: [PATCH] =?UTF-8?q?d2-highlight=E7=BB=84=E4=BB=B6=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 0c3195d9081d1086bdcef0f6db874d55aee835f6 [formerly 0c3195d9081d1086bdcef0f6db874d55aee835f6 [formerly 0c3195d9081d1086bdcef0f6db874d55aee835f6 [formerly 0c3195d9081d1086bdcef0f6db874d55aee835f6 [formerly 12da068299ba55d5e662f8a8632f1306e5b39723 [formerly 3d78de523eae0503b225f4c265bd0089c6f6c9a5]]]]] Former-commit-id: 3acd78000fea252d22e913ef9152183ef2f58299 Former-commit-id: 7ae7ca4ff120db811bff52abe9d27801deb331b4 Former-commit-id: 513d9e25f4e5dbf8cd02538e4864f3c2bfcfb05c [formerly 4b6d9a82ba2bcb2e6ee3e75de1182ff506c23117] Former-commit-id: 1e582207ed544ff95f130003cce03bdf44f9ff81 Former-commit-id: 4d62c9765b14ef177e38e8dc66a9cc60221c9363 Former-commit-id: 8cd32b00b58cbd576dc781cf41b79744e25dae5e Former-commit-id: ef79a906d90ec80c9484816c7781d9794bfe000b Former-commit-id: 5e959e1e6f1e9d21f6c478a0f5b83965d81d96b4 --- docs/zh/components/highlight.md | 5 +++++ src/components/core/d2-highlight/index.vue | 9 ++++++++- .../core/d2-highlight}/libs/htmlFormat.js.REMOVED.git-id | 0 src/pages/demo/components/editor-quill/index.vue | 9 +-------- 4 files changed, 14 insertions(+), 9 deletions(-) rename src/{ => components/core/d2-highlight}/libs/htmlFormat.js.REMOVED.git-id (100%) 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 @@