当前位置:网站首页>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
边栏推荐
- Common JS tool Libraries
- JSON Web Token----JWT和传统session登录认证对比
- Variables d'environnement personnalisées uniapp
- 746. Climb stairs with minimum cost
- 微信小程序使用rich-text中图片宽度超出问题
- regular expression
- Error CVC complex type 2.4. a: Invalid content beginning with element 'base extension' was found. Should start with one of '{layoutlib}'.
- Cloud native - SSH article that must be read on the cloud (commonly used for remote login to ECS)
- Considerations for testing a website
- buuctf-pwn write-ups (8)
猜你喜欢
Abap:ooalv realizes the function of adding, deleting, modifying and checking
InputStream/OutputStream(文件的输入输出)
C语言中的函数(详解)
[MySQL] introduction, function, creation, view, deletion and modification of database view (with exercises)
How to avoid JVM memory leakage?
AWT common components, FileDialog file selection box
ES6 modularization
树形dp
Error CVC complex type 2.4. a: Invalid content beginning with element 'base extension' was found. Should start with one of '{layoutlib}'.
C réaliser des jeux de serpents gourmands
随机推荐
Notes and notes
What is a spotlight effect?
Appium基础 — APPium安装(二)
JS execution mechanism
2022 wechat enterprise mailbox login entry introduction, how to open and register enterprise wechat enterprise mailbox?
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
QT releases multilingual International Translation
实用的小工具指令
Overview of convolutional neural network structure optimization
746. Climb stairs with minimum cost
2022.7.3-----leetcode.556
STC8H开发(十二): I2C驱动AT24C08,AT24C32系列EEPROM存储
STM32 单片机ADC 电压计算
thread priority
ORICO ORICO outdoor power experience, lightweight and portable, the most convenient office charging station
【MySQL】数据库视图的介绍、作用、创建、查看、删除和修改(附练习题)
List of top ten professional skills required for data science work
tcp socket 的 recv 如何接收指定长度消息?
Summary of leetcode BFS question brushing
Tsinghua University product: penalty gradient norm improves generalization of deep learning model