小程序自定义tabbar里的js索引代码会影响数据读不到和swiper报错
发布于 5 年前 作者 yangming 7292 次浏览 来自 官方Issues

/*//自定义tabbar

Component({

pageLifetimes: {

show() {

if (typeof this.getTabBar === ‘function’ &&

this.getTabBar()) {

this.getTabBar().setData({

selected: 0

})

}

}

}

})*/

加上如上代码就会读不到数据 报错禁掉就可以

回到顶部