feat(Tab): add scrollspy prop (#5273)

This commit is contained in:
健忘症患者丶
2019-12-16 20:17:09 +08:00
committed by neverland
parent 9cd06f3b20
commit 4603e1633c
12 changed files with 266 additions and 10 deletions
+13
View File
@@ -174,6 +174,18 @@ export default {
</van-tabs>
```
### 滚动导航
通过`scrollspy`属性可以开启滚动导航模式,该模式下,内容将会平铺展示
```html
<van-tabs v-model="active" scrollspy sticky>
<van-tab v-for="index in 10" :title="'选项 ' + index">
内容 {{ index }}
</van-tab>
</van-tabs>
```
## API
### Tabs Props
@@ -197,6 +209,7 @@ export default {
| sticky | 是否使用粘性定位布局 | *boolean* | `false` | - |
| swipeable | 是否开启手势滑动切换 | *boolean* | `false` | - |
| lazy-render | 是否开启标签页内容延迟渲染 | *boolean* | `true` | - |
| scrollspy | 是否开启滚动导航 | *boolean* | `false` | - |
### Tab Props