mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[new feature] TabbarItem: add name prop
This commit is contained in:
@@ -9,6 +9,35 @@
|
||||
</van-tabbar>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('itemName')">
|
||||
<van-tabbar v-model="activeName">
|
||||
<van-tabbar-item
|
||||
name="home"
|
||||
icon="home-o"
|
||||
>
|
||||
{{ $t('tab') }}
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item
|
||||
name="search"
|
||||
icon="search"
|
||||
>
|
||||
{{ $t('tab') }}
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item
|
||||
name="friends"
|
||||
icon="friends-o"
|
||||
>
|
||||
{{ $t('tab') }}
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item
|
||||
name="setting"
|
||||
icon="setting-o"
|
||||
>
|
||||
{{ $t('tab') }}
|
||||
</van-tabbar-item>
|
||||
</van-tabbar>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('badge')">
|
||||
<van-tabbar v-model="active2">
|
||||
<van-tabbar-item icon="home-o">{{ $t('tab') }}</van-tabbar-item>
|
||||
@@ -69,12 +98,14 @@ export default {
|
||||
'zh-CN': {
|
||||
badge: '显示徽标',
|
||||
customIcon: '自定义图标',
|
||||
customColor: '自定义颜色'
|
||||
customColor: '自定义颜色',
|
||||
itemName: '通过名称匹配'
|
||||
},
|
||||
'en-US': {
|
||||
badge: 'Show Badge',
|
||||
customIcon: 'Custom Icon',
|
||||
customColor: 'Custom Color'
|
||||
customColor: 'Custom Color',
|
||||
itemName: 'Item Name'
|
||||
}
|
||||
},
|
||||
|
||||
@@ -84,6 +115,7 @@ export default {
|
||||
active2: 0,
|
||||
active3: 0,
|
||||
active4: 0,
|
||||
activeName: 'home',
|
||||
icon: {
|
||||
normal: 'https://img.yzcdn.cn/public_files/2017/10/13/c547715be149dd3faa817e4a948b40c4.png',
|
||||
active: 'https://img.yzcdn.cn/public_files/2017/10/13/793c77793db8641c4c325b7f25bf130d.png'
|
||||
|
Reference in New Issue
Block a user