Files
mes-ui-d2/docs/zh/sys-components/highlight.md
liyang 71eacda95e no message
Former-commit-id: bb46254260b63f79a0446cd6c0b1cae0db87cf7b [formerly bb46254260b63f79a0446cd6c0b1cae0db87cf7b [formerly bb46254260b63f79a0446cd6c0b1cae0db87cf7b [formerly bb46254260b63f79a0446cd6c0b1cae0db87cf7b [formerly f85af0b07319129e3cafc6400247a3b82308b0f0 [formerly 7149ab1e3c32251f164cd38a8b62986afc4554ff]]]]]
Former-commit-id: a9aa47ebb3b48597bb758329a27c5d196a1da645
Former-commit-id: b149bde8f052689fa9ed5d03adc4cf6ddb69973e
Former-commit-id: 635393b5bab4f4642ac4ebededd44d2c4e309a93 [formerly 8d79bc548f01fd73357a997c883c4177054e3c14]
Former-commit-id: d8d4d1e4d22828233f1c4d41ab12c0310f9b53fa
Former-commit-id: a07ab011921a7592e3540e9eca0fab9644324a9d
Former-commit-id: ed6baa71f200b8257b1c09af11742e0d69e6cae2
Former-commit-id: 3c645da20b8f1716ca776c1e54af22779223ede7
Former-commit-id: 3b472edeba84c3a2a8f3a135a265bac2193a7daa
2018-08-20 08:48:40 +08:00

24 lines
608 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# d2-highlight
代码高亮显示组件
## 参数
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- | --- |
| code | 代码字符串 | 非 | String | | console.log('you lost code prop') |
| format-html | 是否格式化 HTML | 非 | Boolean | | false |
::: tip
format 建议只在内容为 HTML 的时候打开,如果内容不是 HTML设置为 true 会有负面效果
:::
## 示例
``` vue
<d2-highlight code="alert('Hello')"/>
```
::: tip
本框架只是提供代码高亮的简单实现,如需实现更高级的设置请修改组件代码
:::