vantUI: 使用vantUI的van-tabbar组件切换tabbar的事件没有响应。
Opened this issue · 0 comments
wangren988888 commented
Affected version
0.14.1-beta.1
No same issues found.
- Yes, I search all issues but not found.
Steps to Reproduce
1、vue2.x;
2、main.js引入vantUI2.x
3、App.vue文件使用van-tabbar组件
Code example
html:
<van-tabbar v-model="currentTabBarName" @change="tabBarChange">
<van-tabbar-item name="HomeView" icon="home-o">首页</van-tabbar-item>
<van-tabbar-item name="ActiveView" icon="home-o">活动</van-tabbar-item>
<van-tabbar-item name="CaricatureView" icon="home-o">漫画</van-tabbar-item>
<van-tabbar-item name="LiveView" icon="friends-o">直播</van-tabbar-item>
<van-tabbar-item name="MineView" icon="setting-o">我的</van-tabbar-item>
</van-tabbar>
js:
tabBarChange(event) {
this.$router.replace({
name: event.name
})
}
Expected results
点击tabbar-item时切换页面
Actual results
点击tabbar-item时没有任何响应