动态获取数据时出错
let selectorQuery=uni.createSelectorQuery();
selectorQuery.selectAll('.nav-left-item').boundingClientRect(function(rects) {
console.log(rects);
这个 打印出来为空
![8***@qq.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/d990e3c4e1f795ab4f7f55ace6cf7924.png)
8***@qq.com
- 发布:2019-12-17 17:23
- 更新:2020-07-26 21:29
- 阅读:825
2 个回复
wkiwi - 学历是过去,能力是现在,学习是未来,梦想不止是前端!
onReady生命周期调用 保证dom渲染完毕 异步请求保证 页面dom渲染完毕nextTick(()=>{})
堂吉诃德 - 自学是一门艺术
代码少了exec();