获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
this.query = wx.createSelectorQuery().in(parent.$root.$mp.page);let that = this position(selector) { let that = this; return new Promise(function (resolve, reject) { that.query.select(selector).boundingClientRect().exec(res => { resolve(res[0]); }); }) } //调用时 await this.position('#t01')
createSelectorQuery 返回是重复的信息是为什么?- 当前 Bug 的表现(可附上截图) [图片] - 预期表现 只出现 select 选择的数据 - 复现路径 - 提供一个最简复现 Demo this.query = wx.createSelectorQuery()this.query.select(selector).boundingClientRect().exec(res => { console.log(selector,'=',res) resolve(res[0]); }); 返回值是重复的数据: [图片]
2018-10-21