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
@@ -170,6 +170,18 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
</van-tabs>
```
### Scrollspy
In scrollspy mode, the list of content will be tiled
```html
<van-tabs v-model="active" scrollspy sticky>
<van-tab v-for="index in 10" :title="'tab ' + index">
content {{ index }}
</van-tab>
</van-tabs>
```
## API
### Tabs Props
@@ -193,6 +205,7 @@ In swipeable mode, you can switch tabs with swipe gestrue in the content
| sticky | Whether to use sticky mode | *boolean* | `false` | - |
| swipeable | Whether to switch tabs with swipe gestrue in the content | *boolean* | `false` | - |
| lazy-render | Whether to enable tab content lazy render | *boolean* | `true` | - |
| scrollspy | Whether to use scrollspy mode | *boolean* | `false` | - |
### Tab Props