[new feature] TabbarItem: add name prop

This commit is contained in:
陈嘉涵
2019-05-19 18:20:54 +08:00
parent 20bf1f651e
commit a6b60c2a55
8 changed files with 160 additions and 8 deletions
+23 -1
View File
@@ -31,6 +31,27 @@ export default {
}
```
### Item Name
```html
<van-tabbar v-model="active">
<van-tabbar-item name="home" icon="home-o">Tab</van-tabbar-item>
<van-tabbar-item name="search" icon="search">Tab</van-tabbar-item>
<van-tabbar-item name="friends" icon="friends-o">Tab</van-tabbar-item>
<van-tabbar-item name="setting" icon="setting-o">Tab</van-tabbar-item>
</van-tabbar>
```
```javascript
export default {
data() {
return {
active: 'home'
}
}
}
```
### Show Badge
```html
@@ -119,7 +140,7 @@ export default {
| Attribute | Description | Type | Default |
|------|------|------|------|
| v-model | Index of current tab | `Number` | - |
| v-model | Identifier of current tab | `String | Number` | `0` |
| fixed | Whether to fixed bottom | `Boolean` | `true` |
| z-index | Z-index | `Number` | `1` |
| active-color | Color of active tab item | `String` | `#1989fa` |
@@ -137,6 +158,7 @@ export default {
| Attribute | Description | Type | Default |
|------|------|------|------|
| name | Identifier | `String | Number` | Item index |
| icon | Icon name | `String` | - |
| dot | Whether to show red dot | `Boolean` | - |
| info | Info message | `String | Number` | - |