uView2.X版本的u-tabbar底部导航该如何使用
无论是 uView@1.x 还是 uView@2.x,u-tabbar 都属于自定义 tabbar,如果还在 pages.json 中配置 tabbar 势必底部会出现两个 tabbar,因此使用了自定义 tabbar 就要删除 pages.json 中的 tabbar 的配置。
你应该是想实现,如何在使用自定义 tabbar 的情况下实现页面切换,代码如下:
<view v-show="currentTab===0"> 首页</view><view v-show="currentTab===1"> 放映厅</view><view v-show="currentTab===2"> 直播</view><view v-show="currentTab===3"> 我的</view> <u-tabbar :value="currentTab" @change="change1" :fixed="false" :placeholder="false" :safeAreaInsetBottom="false"> <u-tabbar-item text="首页" icon="home" @click="currentTab=0"></u-tabbar-item> <u-tabbar-item text="放映厅" icon="photo" @click="currentTab=1"></u-tabbar-item> <u-tabbar-item text="直播" icon="play-right" @click="currentTab=2"></u-tabbar-item> <u-tabbar-item text="我的" icon="account" @click="currentTab=3"></u-tabbar-item></u-tabbar>
若文章对您有帮助,帮忙点个赞!

(微信扫码即可登录,无需注册)