1.tabbar组件ready方法中
ready() {
// 缓存tabber栏的高度
const query = wx.createSelectorQuery().in(this)
query.select('.tabbar').boundingClientRect((rect) => {
// console.log(rect.height)
wx.setStorageSync('tabbberHeight', rect.height)
}).exec()
},
2.tabar的html中需要加上一个类名
3.使用的时候直接从缓存中获取值