import Tabbar from '@/components/tabbar'
Vue.component('wm-tabbar',Tabbar);
<wm-tabbar v-model="tabBar.active" @change="navTab"></wm-tabbar>
export default {
data(){
return {
tabBar: {active:0},
}
},
methods:{
/* 切换导航 */
navTab(index){
console.log(index);
},
},
}
{
"usingComponents": {
"wm-tabbar": "/components/tabbar/index",
},
"navigationStyle": "custom"
}
<wm-tabbar active="tabBar.active" bind:change="navTab"></wm-tabbar>
import store from '../../store'
import create from '../../libray/store/create'
create(store,{
data:{
tabBar: {active:0},
},
/* 切换导航 */
navTab(e){
this.setData({['tabBar.active']:e.detail});
},
});
业务咨询
技术问题