Files
mes-ui-d2/docs/zh/components/highlight.md
liyang 04f9ef1a19 优化
Former-commit-id: e701aacf23cc8788415897a957d90d50f02ec915 [formerly e701aacf23cc8788415897a957d90d50f02ec915 [formerly e701aacf23cc8788415897a957d90d50f02ec915 [formerly e701aacf23cc8788415897a957d90d50f02ec915 [formerly 05ecd4d691f0399f0a45841f87f28ab8fa209ad8 [formerly dc8b3924307f1834519d6d2adbe0b3eab2f0b9f9]]]]]
Former-commit-id: 5057dacc82842dadce57d2889423e7991ed10641
Former-commit-id: 1ecc5c9c9f329600c1779a920a5b6e7d50e3db4d
Former-commit-id: 920ca6317275138866e8da9dc63e5f5b106f3352 [formerly f407e4fe88064c4ade2544991034394f97c9a5ab]
Former-commit-id: e8dbe199693eb22b90241c1e36039ecf56cc9817
Former-commit-id: 41d4626eb9a8d36442f23d1ae032cdccefa52ba0
Former-commit-id: 962ea8fe670039e21701d2ba9757387b6cb244d2
Former-commit-id: df96608847d3282c1fa9d18a29f7c1709c50d0cc
Former-commit-id: 8661b8b0172ff0b0cd7b6880a7953cfc6942d258
2018-07-18 00:14:31 +08:00

22 lines
582 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 | 是否格式化 HTML | 非 | Boolean | | false |
::: tip
format 建议只在内容为 HTML 的时候打开,如果内容不是 HTML设置为 true 会有负面效果
:::
## 示例
``` vue
<d2-highlight code="alert('Hello')"/>
```
::: tip
本框架只是提供代码高亮的简单实现,如需实现更高级的设置请修改组件代码
:::