/tr.js
...
lifetimes:{
ready:()=>{
const query = wx.createSelectorQuery().in(this)
query.select('.tr').boundingClientRect(function(res){
console.log('>>>>',res)
}).exec()
console.log('lifetimes attached!')
}
},
/tr.wxml
<!--components/table/tr.wxml-->
<scroll-view scroll-x="{{options.scrollX}}" scroll-y="{{options.scrollY}}">
<view class="tr">
<slot></slot>
</view>
</scroll-view>
在页面中遍历了tr组件。但是会报错:
请问这个错误该如何处理?我已经找过相关提问和信息,但没有有效信息。
有没有可能是渲染时序的问题,在js尝试读取自定义组件时,该组件没有完全渲染完成。