relations: {
'../vtabs-content/vtabs-content': {
type: 'child',
linked: function linked(target) {
const _this = this
target.calcHeight(function (rect) {
_this.data._contentHeight[target.data.tabIndex] = rect.height
if (_this._calcHeightTimer) {
clearTimeout(_this._calcHeightTimer)
}
_this._calcHeightTimer = setTimeout(function () {
_this.calcHeight()
}, 100)
})
},
unlinked: function unlinked(target) {
delete this.data._contentHeight[target.data.tabIndex]
}
}
},
vtabs组件问题, 在 target.calcHeight中,获取rect.height时,获取的高度都是不正确的,这个如何解决?
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)