问题模块 | 框架类型 | 问题类型 | API/组件名称 | 终端类型 | 微信版本 | 基础库版本 |
---|---|---|---|---|---|---|
API和组件 | 小程序 | Bug | wx.createSelectorQuery | 客户端 | 7.0.4 | 2.6.6 |
小程序大量出现上图所述错误,代码如下:
/**
* 页面滚动事件
*/
onPageScroll: function(e) {
let that = this;
const query = wx.createSelectorQuery();
query.select('#pad').boundingClientRect();
query.exec(function(res) {
if (res == null || res.length < 1 || res[0].top == null) {
return;
}
that.setData({
scroll: res[0].top <= 0 ? true : false,
autoPlay: (res[0].top <= 0 ? false : true)
});
})
},
目的是页面滚动的时候,view实现吸顶效果,在开发者工具及真机调试中,都能够正常运行,但是在日志中出现大量如上图提示,这里应该解决呢?
网友回复
undefined:
写的吸顶效果 卡顿么?在低端安卓机中