当前位置:网站首页>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、videoComponentstip:scroll-into-viewHas a higher priority thanscroll-toptip: Rollingscroll-viewWill prevent the page from bouncing , So inscroll-viewMiddle scroll , Can't triggeronPullDownRefreshtip: 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

边栏推荐
- Reading notes of Clickhouse principle analysis and Application Practice (4)
- ES6 modularization
- [openvino+paddle] paddle detection / OCR / SEG export based on paddle2onnx
- Arcpy uses the updatelayer function to change the symbol system of the layer
- 云原生——上云必读之SSH篇(常用于远程登录云服务器)
- 740. Delete and get points
- Fast power (template)
- 2022 Xinjiang's latest eight members (Safety Officer) simulated examination questions and answers
- Tsinghua University product: penalty gradient norm improves generalization of deep learning model
- JSON web token -- comparison between JWT and traditional session login authentication
猜你喜欢

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

C language - Blue Bridge Cup - Snake filling

How does apscheduler set tasks not to be concurrent (that is, execute the next task after the first one)?

C實現貪吃蛇小遊戲

Variables d'environnement personnalisées uniapp

SQL injection SQL lab 11~22

what the fuck! If you can't grab it, write it yourself. Use code to realize a Bing Dwen Dwen. It's so beautiful ~!

JSON Web Token----JWT和傳統session登錄認證對比
![[untitled]](/img/32/cfd45bb5e8555ea2ad344161370dbe.png)
[untitled]

Appium foundation - appium installation (II)
随机推荐
C语言中的排序,实现从小到大的数字排序法
Webrtc quickly set up video call and video conference
ABAP:OOALV实现增删改查功能
对List进行排序工具类,可以对字符串排序
GoogleChromePortable 谷歌chrome浏览器便携版官网下载方式
C realize Snake games
Displaying currency in Indian numbering format
QT get random color value and set label background color code
C # symmetric encryption (AES encryption) ciphertext results generated each time, different ideas, code sharing
[openvino+paddle] paddle detection / OCR / SEG export based on paddle2onnx
lightroom 导入图片灰色/黑色矩形 多显示器
云原生——上云必读之SSH篇(常用于远程登录云服务器)
[March 3, 2019] MAC starts redis
Variables d'environnement personnalisées uniapp
Abap:ooalv realizes the function of adding, deleting, modifying and checking
C language - Blue Bridge Cup - Snake filling
746. Climb stairs with minimum cost
Arcpy 利用updatelayer函数改变图层的符号系统
Which water in the environment needs water quality monitoring
Learning multi-level structural information for small organ segmentation