微信小程序 > 微信公开课 > 小程序scroll-viewbindscroll
微信小程序,微信公开课,小程序scroll-viewbindscroll

小程序scroll-viewbindscroll

2019-03-15 18:17:35

微信公开课小程序热门讨论关于「小程序scroll-viewbindscroll」的小程序开发问题
补充:scrollview中使用bindscroll,就是滚动时候获取scrollTop的值,多个判断,对应去改变导航菜单显示的样式,会有卡顿,如:if(scrollTop515){consolelog(11111111111)thatsetData({monthactiveKey
展开:scrollview中使用bindscroll,就是滚动时候获取scrollTop的值,多个判断,对应去改变导航菜单显示的样式,会有卡顿,如:if(scrollTop<515){  consolelog(11111111111)  thatsetData({   monthactiveKey:1  })  return; } if(scrollTop515&&scrollTop<1030){  consolelog(222222222)  thatsetData({   monthactiveKey:2  })  return; }页滚动的上面设置值范围的时候,对用导航显示的样式需要10s左右才会响应,很卡即速小程序:我也是这样的问题~:if(scrollTop<515&&thatdatamonthactiveKey==2){  consolelog(11111111111)  thatsetData({   monthactiveKey:1  })  return; } if(scrollTop515&&scrollTop<1030&&thatdatamonthactiveKey==1){  consolelog(222222222)  thatsetData({   monthactiveKey:2  })  return; }这么写会不会好点:先下班走了:你的不用scrollview不行吗或者还是这个onPageScroll监听不到scrollview的滚动高度我没试过:亲你这个是scrollview里面吗:在真机上都快就是开发者工具上卡得要死要过五六秒才会有效果:我是这样写的监听页面滚动高度onPageScroll(res){ if(resscrollTop=400){  thissetData({   flag:true  }) }else{  thissetData({   flag:false  }) }},:安卓机很卡ios快:是在开发者工具上真机上很快吧
更多有关「小程序scroll-viewbindscroll」的讨论可以前往微信公开课小程序参与互动哦!
标签:微信公开课,小程序
微信小程序,微信公开课,小程序scroll-viewbindscroll

「小程序scroll-viewbindscroll」热门讨论订阅

方法1:微信扫描微信公开课小程序码即可订阅热门讨论「小程序scroll-viewbindscroll」

方法2:微信搜索微信公开课小程序名称进入,即可订阅热门讨论「小程序scroll-viewbindscroll」

方法3:微信网页访问即速商店,长按识别微信公开课小程序码即可订阅热门讨论「小程序scroll-viewbindscroll」

微信公开课小程序热门讨论「小程序scroll-viewbindscroll」由微信公开课原创摘录于微信小程序商店shop.jisuapp.cn,转载请注明出处。

微信公开课热门讨论「小程序scroll-viewbindscroll」由微信公开课开发者向微信用户提供,并对本服务内容、数据资料及其运营行为等真实性、合法性及有效性承担全部责任。