小程序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」的讨论可以前往微信公开课小程序参与互动哦!
补充: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」热门讨论订阅
方法1:微信扫描微信公开课小程序码即可订阅热门讨论「小程序scroll-viewbindscroll」
方法2:微信搜索微信公开课小程序名称进入,即可订阅热门讨论「小程序scroll-viewbindscroll」
方法3:微信网页访问即速商店,长按识别微信公开课小程序码即可订阅热门讨论「小程序scroll-viewbindscroll」
微信公开课小程序热门讨论「小程序scroll-viewbindscroll」由微信公开课原创摘录于微信小程序商店shop.jisuapp.cn,转载请注明出处。
微信公开课热门讨论「小程序scroll-viewbindscroll」由微信公开课开发者向微信用户提供,并对本服务内容、数据资料及其运营行为等真实性、合法性及有效性承担全部责任。
微信公开课小程序
更新时间:2019-03-15 18:17:35
>
__methodCallerx27;ofundefined
>-404011cloudfunctionexecutionerror
>,请补充选择商家自营-预付卡销售-发行方类目,并在基础信息处申请该类目,通过
>:host在模拟器中显示无效
>:请在小程序服务页面上架正式(非测试)内容或商品后重新提交审核
>.net 微信小程序 上传图片
>'setTimeout'的问题
>‘三朵里熙SPA主题减压空间’为什么搜索关键词‘三朵里‘搜不到
>‘扫普通链接二维码打开小程序‘中设置为体验版,扫码打开是线上版本
>“cloudfunctions**indexjs”gitignore
>“NO ULINK DEVICE FOUND”是怎么回事
>“万马掌上校园”的类目审核
>“上线了”公司开发的微信小程序怎么样?
>“产品是否一定需要条形码”
>