Skip to content

View Containers

View container introductions

componentIntroductionsMinimum version
viewView container1.0.0
scroll-viewScrollable view area1.0.0
web-viewweb-view view1.0.0
swiperScrollable view area1.0.0
swiper-itemOnly can be placed inswiper component1.0.0
cover-imageA picture view that overrides the native component.2.8.3
cover-viewThe text view that overrides the native component.2.8.3
match-mediamedia query Match the detection node.2.9.3
movable-areamovable-view2.9.3
movable-viewA removable view container that can be dragged and slid across the page.2.9.3
page-containerPage container.2.11.3
share-elementShared elements.2.11.3

view

attributetypeDefault valueRequiredIntroductionsMinimum version
hover-classstringnonenoSpecifies the style class to press down on. when hover-class="none" There is no click state effect2.11.4
hover-stop-propagationbooleanfalsenoSpecifies whether to prevent this node's ancestor from clicking2.11.4
hover-start-timenumber50noHow long does it take to click, in milliseconds?2.11.4
hover-stay-timenumber400noClick hold time after finger release, in milliseconds2.11.4

scroll-view

attributetypeDefault valueRequiredIntroductionsMinimum version
scroll-xbooleanfalsenoAllow horizontal rolling1.0.0
scroll-ybooleanfalsenoAllow longitudinal rolling1.0.0
upper-thresholdnumber/string50noTop/How far to the left, triggers. scrolltoupper event1.0.0
lower-thresholdnumber/string50noBottom of Talus/How far to the right, triggers. scrolltolower event1.0.0
scroll-topnumber/stringnoSet Vertical Scroll Bar Position1.0.0
scroll-leftnumber/stringnoSSet Horizontal Scroll Bar Location1.0.0
scroll-into-viewstringnoThe value should be a child element id (id cannot begin with a number). Sets which direction to scroll, then scrolls to the element in which direction1.0.0
refresher-enabledbooleanfalsenoOpen custom drop-down refresh
refresher-thresholdnumber45noSet a custom drop-down refresh threshold
refresher-default-stylestring"black"noSet custom drop-down refresh default style, support settings blackwhite
refresher-backgroundstring"#FFF"noSet the custom drop-down refresh area background color
refresher-triggeredbooleanfalsenoSet current pull - down refresh status, true Indicates that the pull down refresh has been triggered, false Indicates that the drop-down refresh is not triggered
bindscrolltouppereventhandlenoScroll to the top/Triggered on the left1.0.0
bindscrolltolowereventhandlenoScroll to the bottom/Triggered on the right1.0.0
bindscrolleventhandlenoTriggered when scrolling, event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY}1.0.0
bindrefresherpullingeventhandlenoCustom drop-down refresh control is pulled down
bindrefresherrefresheventhandlenoCustom drop-down refresh is triggered
bindrefresherrestoreeventhandlenoCustom drop-down refresh is triggered
bindrefresheraborteventhandlenoCustom drop-down refresh aborted
scroll-with-animationbooleanfalsenoUse animation transitions when setting scroll bar position
enable-back-to-topbooleanfalsenoIOS click on the top status bar, Android double-click the title bar, scroll bar back to the top, only support verticalNot supported
enable-flexbooleanfalsenoEnable flexbox Layout. When enabled, the current node declares the display: flex Will become flex Container and acts on its child nodes.Not supported
scroll-anchoringbooleanfalsenoopen scroll anchoring Property that controls the scrolling position to shake without changing content, and only in the iOS Under the effective Android under reference CSS overflow-anchor Property.Not supported
enhancedbooleanfalsenoEnable scroll-view Enhanced features are enabled by ScrollViewContext operation scroll-view2.12.9
bouncesbooleanfalsenoiOS lower scroll-view Boundary elastic control (Simultaneously open enhanced Takes effect after attribute, only supported for iOS 16 and above)3.0.45
show-scrollbarbooleantruenoScrollbar implicit control (Simultaneously open enhanced Takes effect after attribute)Not supported
paging-enabledbooleanfalsenoPaging slide effect (Simultaneously open enhanced Takes effect after attribute)Not supported
fast-decelerationbooleanfalsenoSliding speed control (Simultaneously open enhanced Takes effect after attribute)Not supported
binddragstarteventhandlenoSliding Start Event (Simultaneously open enhanced Takes effect after attribute) detail { scrollTop, scrollLeft }Not supported
binddraggingeventhandlenoSliding event (Simultaneously open enhanced Takes effect after attribute) detail { scrollTop, scrollLeft }Not supported
binddragendeventhandlenoSlide End Event (Simultaneously open enhanced Takes effect after attribute) detail { scrollTop, scrollLeft, velocity }Not supported

swiper

attributetypeDefault valueRequiredIntroductionsMinimum version
indicator-dotsbooleanfalsenoWhether to display panel pointer1.0.0
indicator-active-colorcolor#000000noCurrently selected pointer color1.0.0
autoplaybooleanfalsenoWhether to switch automatically1.0.0
currentnumber0noThe current slider index1.0.0
intervalnumber5000noAutomatic switching time interval1.0.0
durationnumber500noSlide animation length1.0.0
circularbooleanfalsenoWhether or not to use the slip1.0.0
verticalbooleanfalsenoIs the sliding direction longitudinal?1.0.0
indicator-colorcolorrgba(0, 0, 0, .3)noIndicating point color2.11.4
previous-marginstring"0px"noFront margin, which can be used to expose a small part of the previous item, accepts px and rpx valueNot supported
next-marginstring"0px"noBack margin, which can be used to expose a small portion of the latter item, is acceptable px and rpx valueNot supported
snap-to-edgebooleanfalsenowhen swiper-item A number greater than or equal to 2, closed circular And turn it on previous-margin or next-margin You can specify whether this margin applies to the first and last elementsNot supported
display-multiple-itemsnumber1noNumber of sliders displayed simultaneously2.11.4
easing-functionstring"default"noDesignation swiper Toggle Slow Animation TypeNot supported
bindchangeeventhandlenocurrent When it changes, it triggers change Event, event.detail = {current, source}2.11.4
bindtransitioneventhandlenoswiper-item position changes, triggers transition Event, event.detail = {dx: dx, dy: dy}2.11.4
bindanimationfinisheventhandlenoTriggers at the end of the animation animationfinish Event, event.detail Ditto2.11.4

swiper-item

attributetypeDefault valueRequiredIntroductionsMinimum version
item-idstringnothis swiper-item Identifier ofNot supported
skip-hidden-item-layoutbooleanfalsenoWhether to skip the undisplayed slider layout, set to true Improves sliding performance in complex situations, but loses layout information for hidden state sliders

cover-image

attributetypeDefault valueRequiredIntroductionsMinimum version
srcstringnoIcon path, support temporary path, network address (1.6.0 support), cloud file ID (2.2.3 support).1.0.0
bindloadeventhandlenoTriggered when image loaded successfully2.11.4
binderroreventhandlenoTriggered when picture load fails2.11.4

cover-view

attributetypeDefault valueRequiredIntroductionsMinimum version
scroll-topnumber/stringnoSet the top scroll offset, only when the overflow-y: scroll Becomes a scrolling element.2.11.4

match-media

attributetypeDefault valueRequiredIntroductionsMinimum version
min-widthnumbernoMinimum page width px In units)
max-widthnumbernoMaximum page width px In units)
widthnumbernoPage width px In units)
min-heightnumbernoMinimum page height px In units)
max-heightnumbernoMaximum page height px In units)
heightnumbernoPage height ( px In units)
orientationstringnoScreen direction ( landscape or portrait )

movable-area

attributetypeDefault valueRequiredIntroductionsMinimum version
scale-areaBooleanfalsenoWhen the inside movable-view is set to support double-finger scaling, setting this value can change the scaling gesture effect area to the entire movable-area2.11.4

movable-view

attributetypeDefault valueRequiredIntroductionsMinimum version
directionstringnonenoThe moveable - view direction of movement, with attributes such as all, vertical, horizontal, none2.11.4
inertiabooleanfalsenoMoveable - view with inertia2.11.4
out-of-boundsbooleanfalsenoCan movable-view move after exceeding the movable area2.11.4
xnumbernoDefines the offset in the x-axis direction. If the value of x is not in the movable range, it will automatically move to the movableChanging the value of x triggers animationUnit support px (default), rpx2.11.4
ynumbernoDefines an offset in the y direction, which is automatically moved if the value of y is not in the moveable rangeChanging the value of y triggers the animationUnit support px (default), rpx2.11.4
dampingnumber20noDamping factor, used to control x or y changes in animation and bounce-back animation, the greater the value, the faster it moves2.11.4
frictionnumber2noCoefficient of friction, used to control the animation of inertial sliding, the greater the value of the friction, the faster the sliding stopsMust be greater than 0 or it will be set to default1.2.0
disabledbooleanfalsenoIs it disabled?
scalebooleanfalsenoDual finger zoom is supported. The default area for zoom gestures is within movable-view2.11.4
scale-minnumber0.5noDefine minimum zoom2.11.4
scale-maxnumber10noDefine maximum scaling factor2.11.4
scale-valuenumber1noDefines the scaling factor, which has a range of values 0.5 - 102.11.4
animationbooleantruenoWhether to use animation2.11.4
bindchangeeventhandlenoEvent triggered during drag, event.detail = {x, y, source}2.11.4
bindscaleeventhandlenoEvent triggered during scaling, event.detail = {x, y, scale}, x and y fields supported after 2.1.02.11.4
htouchmoveeventhandlenoTriggered when the first finger touch moves laterally. If this event is caught, it means the touchmove event is also caught.2.11.4
vtouchmoveeventhandlenoTriggered when the movement is longitudinal after the first finger touch. If the event is caught, it means the touchmove event is also caught2.11.4

page-container

attributetypeDefault valueRequiredIntroductionsMinimum version
showbooleanfalsenoWhether to display container components2.11.3
durationnumber300noAnimation duration, in milliseconds2.11.3
z-indexnumber100noz-index level2.11.3
overlaybooleantruenoWhether to display mask layer2.11.3
positionstringbottomnoPopup location, optionally top bottom right center2.11.3
roundbooleanfalsenoShow rounded corners2.11.3
close-on-slide-downbooleanfalsenoWhether to close down after a slide2.11.3
overlay-stylestringnoCustom mask layer styles2.11.3
custom-stylestringnoCustom Pop Up Layer Style2.11.3
bind:beforeentereventhandlenoPre-entry trigger2.11.3
bind:entereventhandlenoTriggered on entry2.11.3
bind:afterentereventhandlenoPost-entry trigger2.11.3
bind:beforeleaveeventhandlenoTrigger before leaving2.11.3
bind:leaveeventhandlenoTriggered on exit2.11.3
bind:afterleaveeventhandlenoTriggered after leaving2.11.3
bind:clickoverlayeventhandlenoTriggered when the mask layer is clicked2.11.3

share-element

attributetypeDefault valueRequiredIntroductionsMinimum version
keystringyesMapping marker2.11.3
transformbooleanfalsenoWhether to animate2.11.3
durationnumber300noAnimation duration, in milliseconds2.11.3
easing-functionstringease-outnocss Retarded function2.11.3