微信小程序 获取自定义tabbar的高度

Component({
	properties: {

	},
	data:{
		tabBarHeight:0,
	},
	lifetimes:{
		attached: function(options) {
			let _this = this 
			let query = wx.createSelectorQuery();
			query.select('.cu-bar').boundingClientRect(rect=>{
				let height = rect.height;
				_this.setData({
					tabBarHeight: height
				})
			}).exec();
		}
	}

})