1.同一組v-if一定要寫在v-else前面
正確用法
<tab-bar-item path="/home" >
<img src="../assets/img/tabbar/home_active.svg" alt="" slot="item-icon-active" v-if="isActive">
<img src="../assets/img/tabbar/home.svg" alt="home" slot="item-icon" v-else>
<span slot="item-text">首頁</span>
</tab-bar-item>
錯誤用法
<tab-bar-item path="/home" >
<img src="../assets/img/tabbar/home.svg" alt="home" slot="item-icon" v-else>
<img src="../assets/img/tabbar/home_active.svg" alt="" slot="item-icon-active" v-if="isActive">
<span slot="item-text">首頁</span>
</tab-bar-item>