docs: make document more compact
This commit is contained in:
@@ -61,11 +61,11 @@ export default {
|
||||
<van-tree-select
|
||||
height="55vw"
|
||||
:items="items"
|
||||
:main-active-index.sync="activeIndex"
|
||||
:main-active-index.sync="active"
|
||||
>
|
||||
<template slot="content">
|
||||
<van-image v-if="activeIndex === 0" src="https://img.yzcdn.cn/vant/apple-1.jpg" />
|
||||
<van-image v-if="activeIndex === 1" src="https://img.yzcdn.cn/vant/apple-2.jpg" />
|
||||
<van-image v-if="active === 0" src="https://img.yzcdn.cn/vant/apple-1.jpg" />
|
||||
<van-image v-if="active === 1" src="https://img.yzcdn.cn/vant/apple-2.jpg" />
|
||||
</template>
|
||||
</van-tree-select>
|
||||
```
|
||||
@@ -74,7 +74,7 @@ export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
active: 0,
|
||||
items: [{ text: 'Group 1' }, { text: 'Group 2' }]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,11 +67,11 @@ export default {
|
||||
<van-tree-select
|
||||
height="55vw"
|
||||
:items="items"
|
||||
:main-active-index.sync="activeIndex"
|
||||
:main-active-index.sync="active"
|
||||
>
|
||||
<template slot="content">
|
||||
<van-image v-if="activeIndex === 0" src="https://img.yzcdn.cn/vant/apple-1.jpg" />
|
||||
<van-image v-if="activeIndex === 1" src="https://img.yzcdn.cn/vant/apple-2.jpg" />
|
||||
<van-image v-if="active === 0" src="https://img.yzcdn.cn/vant/apple-1.jpg" />
|
||||
<van-image v-if="active === 1" src="https://img.yzcdn.cn/vant/apple-2.jpg" />
|
||||
</template>
|
||||
</van-tree-select>
|
||||
```
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
active: 0,
|
||||
items: [{ text: '分组 1' }, { text: '分组 2' }]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user