no message
Former-commit-id: 0a96bb54e9270e451e59b72e00e35053a7c0e152 Former-commit-id: c250ba90da6546626b9831847630aae786c88344 Former-commit-id: c1182b1bdc6ea9b3934275286a93e2760a643bfe
This commit is contained in:
41
static/markdownFiles/article/highLight组件使用方法.md
Normal file
41
static/markdownFiles/article/highLight组件使用方法.md
Normal file
@@ -0,0 +1,41 @@
|
||||
`highLight` 组件已经全局注册,可以直接使用
|
||||
|
||||
组件内部使用 `Prism` 实现代码高亮
|
||||
|
||||
```
|
||||
<Card>
|
||||
<p slot="title">示例1</p>
|
||||
<highLight :data="test1"></highLight>
|
||||
</Card>
|
||||
<br>
|
||||
<Card>
|
||||
<p slot="title">示例2</p>
|
||||
<highLight :data="test2"></highLight>
|
||||
</Card>
|
||||
<br>
|
||||
<Card>
|
||||
<p slot="title">示例3</p>
|
||||
<highLight :data="test3" :stringify="false"></highLight>
|
||||
</Card>
|
||||
```
|
||||
|
||||
数据源
|
||||
|
||||
```
|
||||
data () {
|
||||
return {
|
||||
test1: [0, 1, 2, 3],
|
||||
test2: {
|
||||
name: 'me',
|
||||
like: [
|
||||
'like1',
|
||||
'like2'
|
||||
],
|
||||
address: [
|
||||
'address1'
|
||||
]
|
||||
},
|
||||
test3: '<Markdown url="/static/markdownFiles/article/highLight组件使用方法.md"></Markdown>'
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user