小程序视图组件 scroll-view

视图容器组件

3.2.1、swiper

滑块视图容器。

https://developers.weixin.qq.com/miniprogram/dev/component/swiper.html

3.2.2、scroll-view

https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html

可滚动视图区域。使用竖向滚动时,需要给<scroll-view>一个固定高度,通过 WXSS 设置 height,同时还需要在组件属性中定义允许纵向滚动 scroll-y=”{{true}}”。

注意点

tip: 请勿在2.4.0以下scroll-view 中使用 textareamapcanvasvideo 组件

tip: 在滚动 scroll-view 时会阻止页面回弹,所以在 scroll-view 中滚动,是无法触发 onPullDownRefresh

一定要设置高度,事件触发,必须是大于了你设置的高度才能被触发到事件

右侧打赏一下 代码改变世界一块二块也是爱
原文地址:https://www.cnblogs.com/ht955/p/15172917.html