后面要加route
<van-tabbar v-model="currentIndex" active-color="#ff9854" route >
因为图标是自己的 需要自己添加监听
const route = useRoute()
watch(route,(newRoute) => {
const index = tabbarData.findIndex(item => item.path === newRoute.path)
if (index=== -1 ) return
currentIndex.value = index
})
OK!!!