Scrollable view area. A view group that allows the view hierarchy placed within it to be scrolled.
When using vertical scrolling, you need to give the scroll view a fixed height.
tip: The priority of scroll-into-view is higher than that of scroll-top.
tip: Scrolling in the scroll-view will prevent the page from bouncing back, so scrolling in the
scroll-view cannot trigger onpulldownrefresh.
tip: To use the pull-down refresh, please use the scroll of the page instead of the scroll-view,
so that you can return to the top of the page by clicking the status bar at the top.
Props
Name
Type
Description
Default
scroll-x
boolean
Allow lateral scrolling
false
scroll-y
boolean
Allow vertical scrolling
false
scroll-top
string | number
Set vertical scroll bar position
scroll-left
string | number
Set horizontal scroll bar position
scroll-into-view
string
The value should be the ID of a child element (ID cannot start with a number). Set which direction to scroll, then scroll to the element in which direction
scroll-into-view-alignment
string
set alignment of target view when scroll into the view, support from jssdk >= 4.17.0
"start"
upper-threshold
string | number
When it is far from the top / left, the scrolltupper event is triggered
50
lower-threshold
string | number
When it is far from the bottom / right, the scrollcolor event is triggered
50
enhanced
boolean
Enable the scroll view enhancement feature. After enabling, you can operate scroll view through ScrollViewContext
false
fast-deceleration
boolean
Sliding deceleration rate control (effective after the enhanced attribute is turned on at the same time)
false
show-scrollbar
boolean
Enabled when enhanced, control the scrollbar show/hide
true
refresher-enabled
boolean
Enable pull-down refresh, support from jssdk >= 4.9.0
false
refresher-threshold
number
refresher threshold to trigger refresh (in px), support from jssdk >= 4.9.0
45
refresher-default-style
string
refresher default style, support from jssdk >= 4.9.0 options: black, white, none
"black"
refresher-background
string
refresher background style, support from jssdk >= 4.9.0
"#FFF"
refresher-triggered
boolean
is refresher triggered, support from jssdk >= 4.9.0
false
scroll-anchoring
boolean
solve the problem of content jumping from jssdk >= 4.14.0
scroll-with-animation
boolean
Use animation transitions when setting scroll bar position, support from jssdk >= 4.17.0
false
scroll-speed-limit
number
Scroll pixels per millisecond, Limit scroll speed, support from jssdk >= 4.18.0
"Infinity"
type
string
Skyline props for better long list performance, support from jssdk >= 4.31.0
extra
object
Business related-custom data, support from jssdk >= 4.32.0
bounces
boolean
true
virtual-list-buffer
number
250
enable-back-to-top
boolean
Enables the scroll bar to return to the top when the top status bar is tapped on iOS or the title bar is double-tapped on Android. Only vertical scrolling is supported. iOS support from jssdk >= 4.44.0, Android should support from jssdk >= 4.45.0
false
Events
Name
Description
bindscroll
bindscroll Triggered when scrolling,Argumentsevent: detail: Object — The detail event objectObject{ scrollLeft, scrollTop, scrollHeight, scrollWidth, scrollWidth, deltaX, deltaY }
bindscrollstart
bindscrollstart Triggered when scroll start, support msv >= 4.36.0Argumentsevent: detail: Object — The detail event objectObject{ scrollLeft, scrollTop, scrollHeight, scrollWidth, scrollWidth }
bindscrollend
bindscrollend Triggered when scroll end, support msv >= 4.36.0Argumentsevent: detail: Object — The detail event objectObject{ scrollLeft, scrollTop, scrollHeight, scrollWidth, scrollWidth }
bindscrolltoupper
bindscrolltoupper Scroll to the top/Triggered on the left
bindscrolltolower
bindscrolltolower Scroll to the bottom/Triggered on the right
bindrefresherpulling
bindrefresherpulling Triggered when pulling down
bindrefresherrefresh
bindrefresherrefresh Triggered when refreshing
bindrefresherrestore
bindrefresherrestore Triggered when pull-down refresher restoring
bindrefresherabort
bindrefresherabort Triggered when refresh aborting
bindvirtuallistitemupdate
bindvitruallistitemupdate Triggered when virtual list mounted item update