1
tabbar在点击切换路由后颜色并没激活,需要再点击一次
Environment
- Device:
- Browser:
- Vant Version: 1.5.1
下面是关键部分代码:
<template> <!-- 主框架页面 --> <div id="main-page"> <!-- <transition :name="transitionName"> --> <!-- @after-leave="afterLeave" --> <router-view class="main-content child-view"> <!-- </transition> --> <van-tabbar v-model="active" @change="handleTabbarChange"> <van-tabbar-item icon="tabbar-home" to="home">首页</van-tabbar-item> <van-tabbar-item icon="tabbar-find" to="find">查找</van-tabbar-item> <van-tabbar-item icon="tabbar-msg" to="cart">消息</van-tabbar-item> <van-tabbar-item icon="tabbar-cart" to="cart">购物车</van-tabbar-item> <van-tabbar-item icon="tabbar-mine" to="mine">我的</van-tabbar-item> </van-tabbar> </router-view></div> </template>