The problem of tabbar data recording in vux

how do I monitor selected ?

for example, when $router.path=="/" , add selected , then

<tabbar style="position:fixed;z-index:999">
  <tabbar-item selected link="/">
    <img slot="icon" src="../../static/bottom/home.png">
    <img slot="icon-active" src="../../static/bottom/home-ok.png">
    <span slot="label"></span>
  </tabbar-item>
  <tabbar-item @on-item-click="aaa" link="/shopping">
    <img slot="icon" src="../../static/bottom/shop.png">
    <img slot="icon-active" src="../../static/bottom/shop-ok.png">
    <span slot="label"></span>
  </tabbar-item>
  <tabbar-item link="/deal">
    <img slot="icon" src="../../static/bottom/trade.png">
    <img slot="icon-active" src="../../static/bottom/trade-ok.png">
    <span slot="label"></span>
  </tabbar-item>
  <tabbar-item link="/my">
    <img slot="icon" src="../../static/bottom/personal.png">
    <img slot="icon-active" src="../../static/bottom/personal-ok.png">
    <span slot="label"></span>
  </tabbar-item>
</tabbar>

clipboard.png

Don"t click Synchronize on the icon

Mar.28,2021

add judgment to the picture as well as judgment to the text

< tabbar-item link= "/" >

<img v-if="$route.path==`/`" slot="icon" src="../../static/bottom/home-ok.png">
<img v-else slot="icon" src="../../static/bottom/home.png">
<span  v-if="$route.path==`/`" slot="label" style="color:-sharp4caf50"></span>
<span v-else slot="label"></span>

< / tabbar-item >


but the first path cannot be activated. It's always gray

.
Menu