Files
mes-ui-d2/docs/zh/components/highlight.md
liyang a780f48f58 d2-highlight组件升级
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
2018-07-18 00:11:13 +08:00

22 lines
577 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.

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