tabbar选中优化
This commit is contained in:
@@ -179,6 +179,14 @@ Page({
|
||||
this.loadGoodsList(true);
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 自定义 tabBar 每个 Tab 页各有一份实例,切过来后要按当前路由重设选中项
|
||||
const tabBar = typeof this.getTabBar === 'function' && this.getTabBar();
|
||||
if (tabBar) {
|
||||
tabBar.init();
|
||||
}
|
||||
},
|
||||
|
||||
async applyCaseView() {
|
||||
if (this.data.caseView) {
|
||||
wx.setNavigationBarTitle({ title: '软件案例' });
|
||||
|
||||
@@ -154,6 +154,11 @@ Page({
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 自定义 tabBar 每个 Tab 页各有一份实例,切过来后要按当前路由重设选中项
|
||||
const tabBar = typeof this.getTabBar === 'function' && this.getTabBar();
|
||||
if (tabBar) {
|
||||
tabBar.init();
|
||||
}
|
||||
this.loadList(true);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user