ScoutYin / ly-tab

🎉 A mobile touch-swappable tabs component for Vue.js 2.x

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v-model="selectedId" 在页面刚刚执行的时候,动态给赋值没有效果。

Shangri-GitHub opened this issue · comments

在页面刚刚执行的时候,动态给赋值没有效果
mounted: function () {
this.selectedId = 2;
}

已解决,用这个可以
beforeMount: function () {
this.selectedId = 2;
},

可以根据 selectedId 值的改变 控制导航定位吗?