我真服了这个问题啦,An SelectorQuery call is ignor
- 一直报到死的警告,死都获取不到组件
VM54:1 An SelectorQuery call is ignored because no proper page or component is found. Please considering using `SelectorQuery.in` to specify a proper one.
- 放在onLoad里不行,放在onReady里也不行,延迟5秒都还不行,到底行不行啦!
const query = wx.createSelectorQuery().in(this)
query.select('#old-house-chat').boundingClientRect(function(res){
res.top // 这个组件内 #the-id 节点的上边界坐标
}).exec()
<view class=“ec-expontent”>
<ec-canvas id=“sell-house-chat” canvas-id=“old-house-chat” class=“ec-canvas mychart” ec="{{ sellhouseEc }}"></ec-canvas>
</view>