当前位置:网站首页>Wechat applet scroll view component scrollable view area
Wechat applet scroll view component scrollable view area
2022-07-04 06:35:00 【JackieDYH】
Scrollable view area . When using vertical scrolling , Need to give scroll-view A fixed height , adopt WXSS Set up height. The default length unit for component properties is px, 2.4.0 Support for incoming units (rpx/px).
attribute | type | The default value is | Required | explain | Minimum version |
---|---|---|---|---|---|
scroll-x | boolean | false | no | Allow horizontal scrolling | 1.0.0 |
scroll-y | boolean | false | no | Allow vertical scrolling | 1.0.0 |
upper-threshold | number/string | 50 | no | From the top / How far to the left , Trigger scrolltoupper event | 1.0.0 |
lower-threshold | number/string | 50 | no | From the bottom / How far to the right , Trigger scrolltolower event | 1.0.0 |
scroll-top | number/string | no | Set the vertical scroll bar position | 1.0.0 | |
scroll-left | number/string | no | Set the horizontal scroll bar position | 1.0.0 | |
scroll-into-view | string | no | Value should be a child element id(id Cannot start with a number ). Set which direction to scroll in , In which direction to scroll to the element | 1.0.0 | |
scroll-with-animation | boolean | false | no | Use animated transitions when setting scroll bar positions | 1.0.0 |
enable-back-to-top | boolean | false | no | iOS Click on the top status bar 、 When Android double clicks the title bar , Scroll bar back to top , Only vertical | 1.0.0 |
enable-flex | boolean | false | no | Enable flexbox Layout . After opening , The current node declares display: flex Will become flex container, And act on its child nodes . | 2.7.3 |
scroll-anchoring | boolean | false | no | Turn on scroll anchoring characteristic , That is, control the scrolling position not to shake with the change of content , Only in iOS Take effect , Android can refer to CSS overflow-anchor attribute . | 2.8.2 |
refresher-enabled | boolean | false | no | Enable custom drop-down refresh | 2.10.1 |
refresher-threshold | number | 45 | no | Set custom drop-down refresh threshold | 2.10.1 |
refresher-default-style | string | "black" | no | Set custom dropdown to refresh the default style , Support settings black | white | none , none Indicates that the default style is not used | 2.10.1 |
refresher-background | string | "#FFF" | no | Set custom drop-down refresh area background color | 2.10.1 |
refresher-triggered | boolean | false | no | Set the current pull-down refresh status ,true Indicates that the pull-down refresh has been triggered ,false Indicates that the pull-down refresh is not triggered | 2.10.1 |
bindscrolltoupper | eventhandle | no | Scroll to top / Trigger on the left | 1.0.0 | |
bindscrolltolower | eventhandle | no | Scroll to the bottom / Trigger on the right | 1.0.0 | |
bindscroll | eventhandle | no | Trigger when scrolling ,event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY} | 1.0.0 | |
bindrefresherpulling | eventhandle | no | Custom dropdown refresh control is dropdown | 2.10.1 | |
bindrefresherrefresh | eventhandle | no | Custom pull down refresh triggered | 2.10.1 | |
bindrefresherrestore | eventhandle | no | Custom pull down refresh reset | 2.10.1 | |
bindrefresherabort | eventhandle | no | Custom pull down refresh aborted | 2.10.1 |
Bug & Tip
tip
: Base library 2.4.0 Nesting is not supported belowtextarea
、map
、canvas
、video
Componentstip
:scroll-into-view
Has a higher priority thanscroll-top
tip
: Rollingscroll-view
Will prevent the page from bouncing , So inscroll-view
Middle scroll , Can't triggeronPullDownRefresh
tip
: To use pull-down refresh , Please use the page scroll , instead ofscroll-view
, You can also go back to the top of the page by clicking on the top status bartip
: scroll-view Custom pull-down refresh can be combined WXS Event response Develop interactive animation
Example
Visual area scrolling menu case
边栏推荐
- Bicolor case
- Practical gadget instructions
- After the festival, a large number of people change careers. Is it still time to be 30? Listen to the experience of the past people
- [problem record] 03 connect to MySQL database prompt: 1040 too many connections
- 2022 where to find enterprise e-mail and which is the security of enterprise e-mail system?
- [number theory] fast power (Euler power)
- What is the "relative dilemma" in cognitive fallacy?
- leetcode 310. Minimum Height Trees
- Learn about the Internet of things protocol WiFi ZigBee Bluetooth, etc. --- WiFi and WiFi protocols start from WiFi. What do we need to know about WiFi protocol itself?
- InputStream/OutputStream(文件的输入输出)
猜你喜欢
实用的小工具指令
[Android reverse] function interception (CPU cache mechanism | CPU cache mechanism causes function interception failure)
Notes and notes
Webrtc quickly set up video call and video conference
QT qtablewidget table column top requirements ideas and codes
198. House raiding
Reading notes of Clickhouse principle analysis and Application Practice (4)
[problem record] 03 connect to MySQL database prompt: 1040 too many connections
Uniapp custom environment variables
The solution of win11 taskbar right click without Task Manager - add win11 taskbar right click function
随机推荐
After the festival, a large number of people change careers. Is it still time to be 30? Listen to the experience of the past people
Internet of things protocol ZigBee ZigBee module uses the concept of protocol stack
Practical gadget instructions
2022 Xinjiang's latest eight members (Safety Officer) simulated examination questions and answers
[Android reverse] function interception (CPU cache mechanism | CPU cache mechanism causes function interception failure)
Mysql 45讲学习笔记(十四)count(*)
JSON Web Token----JWT和传统session登录认证对比
uniapp 自定义环境变量
Understanding of cross domain and how to solve cross domain problems
GoogleChromePortable 谷歌chrome浏览器便携版官网下载方式
Learn about the Internet of things protocol WiFi ZigBee Bluetooth, etc. --- WiFi and WiFi protocols start from WiFi. What do we need to know about WiFi protocol itself?
The solution of win11 taskbar right click without Task Manager - add win11 taskbar right click function
2022 wechat enterprise mailbox login entry introduction, how to open and register enterprise wechat enterprise mailbox?
How to implement cross domain requests
Mysql 45讲学习笔记(十)force index
Vant --- detailed explanation and use of list component in vant
Functions in C language (detailed explanation)
[openvino+paddle] paddle detection / OCR / SEG export based on paddle2onnx
分布式CAP理论
Average two numbers