View Containers
View container introductions
| component | Introductions | Minimum version |
|---|---|---|
| view | View container | 1.0.0 |
| scroll-view | Scrollable view area | 1.0.0 |
| web-view | web-view view | 1.0.0 |
| swiper | Scrollable view area | 1.0.0 |
| swiper-item | Only can be placed inswiper component | 1.0.0 |
| cover-image | A picture view that overrides the native component. | 2.8.3 |
| cover-view | The text view that overrides the native component. | 2.8.3 |
| match-media | media query Match the detection node. | 2.9.3 |
| movable-area | movable-view | 2.9.3 |
| movable-view | A removable view container that can be dragged and slid across the page. | 2.9.3 |
| page-container | Page container. | 2.11.3 |
| share-element | Shared elements. | 2.11.3 |
view
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| hover-class | string | none | no | Specifies the style class to press down on. when hover-class="none" There is no click state effect | 2.11.4 |
| hover-stop-propagation | boolean | false | no | Specifies whether to prevent this node's ancestor from clicking | 2.11.4 |
| hover-start-time | number | 50 | no | How long does it take to click, in milliseconds? | 2.11.4 |
| hover-stay-time | number | 400 | no | Click hold time after finger release, in milliseconds | 2.11.4 |
scroll-view
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| scroll-x | boolean | false | no | Allow horizontal rolling | 1.0.0 |
| scroll-y | boolean | false | no | Allow longitudinal rolling | 1.0.0 |
| upper-threshold | number/string | 50 | no | Top/How far to the left, triggers. scrolltoupper event | 1.0.0 |
| lower-threshold | number/string | 50 | no | Bottom of Talus/How far to the right, triggers. scrolltolower event | 1.0.0 |
| scroll-top | number/string | no | Set Vertical Scroll Bar Position | 1.0.0 | |
| scroll-left | number/string | no | SSet Horizontal Scroll Bar Location | 1.0.0 | |
| scroll-into-view | string | no | The 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 direction | 1.0.0 | |
| refresher-enabled | boolean | false | no | Open custom drop-down refresh | |
| refresher-threshold | number | 45 | no | Set a custom drop-down refresh threshold | |
| refresher-default-style | string | "black" | no | Set custom drop-down refresh default style, support settings black | white |
| refresher-background | string | "#FFF" | no | Set the custom drop-down refresh area background color | |
| refresher-triggered | boolean | false | no | Set 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 | |
| bindscrolltoupper | eventhandle | no | Scroll to the top/Triggered on the left | 1.0.0 | |
| bindscrolltolower | eventhandle | no | Scroll to the bottom/Triggered on the right | 1.0.0 | |
| bindscroll | eventhandle | no | Triggered when scrolling, event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY} | 1.0.0 | |
| bindrefresherpulling | eventhandle | no | Custom drop-down refresh control is pulled down | ||
| bindrefresherrefresh | eventhandle | no | Custom drop-down refresh is triggered | ||
| bindrefresherrestore | eventhandle | no | Custom drop-down refresh is triggered | ||
| bindrefresherabort | eventhandle | no | Custom drop-down refresh aborted | ||
| scroll-with-animation | boolean | false | no | Use animation transitions when setting scroll bar position | |
| enable-back-to-top | boolean | false | no | IOS click on the top status bar, Android double-click the title bar, scroll bar back to the top, only support vertical | Not supported |
| enable-flex | boolean | false | no | Enable flexbox Layout. When enabled, the current node declares the display: flex Will become flex Container and acts on its child nodes. | Not supported |
| scroll-anchoring | boolean | false | no | open 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 |
| enhanced | boolean | false | no | Enable scroll-view Enhanced features are enabled by ScrollViewContext operation scroll-view | 2.12.9 |
| bounces | boolean | false | no | iOS lower scroll-view Boundary elastic control (Simultaneously open enhanced Takes effect after attribute, only supported for iOS 16 and above) | 3.0.45 |
| show-scrollbar | boolean | true | no | Scrollbar implicit control (Simultaneously open enhanced Takes effect after attribute) | Not supported |
| paging-enabled | boolean | false | no | Paging slide effect (Simultaneously open enhanced Takes effect after attribute) | Not supported |
| fast-deceleration | boolean | false | no | Sliding speed control (Simultaneously open enhanced Takes effect after attribute) | Not supported |
| binddragstart | eventhandle | no | Sliding Start Event (Simultaneously open enhanced Takes effect after attribute) detail { scrollTop, scrollLeft } | Not supported | |
| binddragging | eventhandle | no | Sliding event (Simultaneously open enhanced Takes effect after attribute) detail { scrollTop, scrollLeft } | Not supported | |
| binddragend | eventhandle | no | Slide End Event (Simultaneously open enhanced Takes effect after attribute) detail { scrollTop, scrollLeft, velocity } | Not supported |
swiper
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| indicator-dots | boolean | false | no | Whether to display panel pointer | 1.0.0 |
| indicator-active-color | color | #000000 | no | Currently selected pointer color | 1.0.0 |
| autoplay | boolean | false | no | Whether to switch automatically | 1.0.0 |
| current | number | 0 | no | The current slider index | 1.0.0 |
| interval | number | 5000 | no | Automatic switching time interval | 1.0.0 |
| duration | number | 500 | no | Slide animation length | 1.0.0 |
| circular | boolean | false | no | Whether or not to use the slip | 1.0.0 |
| vertical | boolean | false | no | Is the sliding direction longitudinal? | 1.0.0 |
| indicator-color | color | rgba(0, 0, 0, .3) | no | Indicating point color | 2.11.4 |
| previous-margin | string | "0px" | no | Front margin, which can be used to expose a small part of the previous item, accepts px and rpx value | Not supported |
| next-margin | string | "0px" | no | Back margin, which can be used to expose a small portion of the latter item, is acceptable px and rpx value | Not supported |
| snap-to-edge | boolean | false | no | when 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 elements | Not supported |
| display-multiple-items | number | 1 | no | Number of sliders displayed simultaneously | 2.11.4 |
| easing-function | string | "default" | no | Designation swiper Toggle Slow Animation Type | Not supported |
| bindchange | eventhandle | no | current When it changes, it triggers change Event, event.detail = {current, source} | 2.11.4 | |
| bindtransition | eventhandle | no | swiper-item position changes, triggers transition Event, event.detail = {dx: dx, dy: dy} | 2.11.4 | |
| bindanimationfinish | eventhandle | no | Triggers at the end of the animation animationfinish Event, event.detail Ditto | 2.11.4 |
swiper-item
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| item-id | string | no | this swiper-item Identifier of | Not supported | |
| skip-hidden-item-layout | boolean | false | no | Whether 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
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| src | string | no | Icon path, support temporary path, network address (1.6.0 support), cloud file ID (2.2.3 support). | 1.0.0 | |
| bindload | eventhandle | no | Triggered when image loaded successfully | 2.11.4 | |
| binderror | eventhandle | no | Triggered when picture load fails | 2.11.4 |
cover-view
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| scroll-top | number/string | no | Set the top scroll offset, only when the overflow-y: scroll Becomes a scrolling element. | 2.11.4 |
match-media
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| min-width | number | no | Minimum page width px In units) | ||
| max-width | number | no | Maximum page width px In units) | ||
| width | number | no | Page width px In units) | ||
| min-height | number | no | Minimum page height px In units) | ||
| max-height | number | no | Maximum page height px In units) | ||
| height | number | no | Page height ( px In units) | ||
| orientation | string | no | Screen direction ( landscape or portrait ) |
movable-area
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| scale-area | Boolean | false | no | When 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-area | 2.11.4 |
movable-view
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| direction | string | none | no | The moveable - view direction of movement, with attributes such as all, vertical, horizontal, none | 2.11.4 |
| inertia | boolean | false | no | Moveable - view with inertia | 2.11.4 |
| out-of-bounds | boolean | false | no | Can movable-view move after exceeding the movable area | 2.11.4 |
| x | number | no | Defines 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), rpx | 2.11.4 | |
| y | number | no | Defines 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), rpx | 2.11.4 | |
| damping | number | 20 | no | Damping factor, used to control x or y changes in animation and bounce-back animation, the greater the value, the faster it moves | 2.11.4 |
| friction | number | 2 | no | Coefficient 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 default | 1.2.0 |
| disabled | boolean | false | no | Is it disabled? | |
| scale | boolean | false | no | Dual finger zoom is supported. The default area for zoom gestures is within movable-view | 2.11.4 |
| scale-min | number | 0.5 | no | Define minimum zoom | 2.11.4 |
| scale-max | number | 10 | no | Define maximum scaling factor | 2.11.4 |
| scale-value | number | 1 | no | Defines the scaling factor, which has a range of values 0.5 - 10 | 2.11.4 |
| animation | boolean | true | no | Whether to use animation | 2.11.4 |
| bindchange | eventhandle | no | Event triggered during drag, event.detail = {x, y, source} | 2.11.4 | |
| bindscale | eventhandle | no | Event triggered during scaling, event.detail = {x, y, scale}, x and y fields supported after 2.1.0 | 2.11.4 | |
| htouchmove | eventhandle | no | Triggered when the first finger touch moves laterally. If this event is caught, it means the touchmove event is also caught. | 2.11.4 | |
| vtouchmove | eventhandle | no | Triggered when the movement is longitudinal after the first finger touch. If the event is caught, it means the touchmove event is also caught | 2.11.4 |
page-container
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| show | boolean | false | no | Whether to display container components | 2.11.3 |
| duration | number | 300 | no | Animation duration, in milliseconds | 2.11.3 |
| z-index | number | 100 | no | z-index level | 2.11.3 |
| overlay | boolean | true | no | Whether to display mask layer | 2.11.3 |
| position | string | bottom | no | Popup location, optionally top bottom right center | 2.11.3 |
| round | boolean | false | no | Show rounded corners | 2.11.3 |
| close-on-slide-down | boolean | false | no | Whether to close down after a slide | 2.11.3 |
| overlay-style | string | no | Custom mask layer styles | 2.11.3 | |
| custom-style | string | no | Custom Pop Up Layer Style | 2.11.3 | |
| bind:beforeenter | eventhandle | no | Pre-entry trigger | 2.11.3 | |
| bind:enter | eventhandle | no | Triggered on entry | 2.11.3 | |
| bind:afterenter | eventhandle | no | Post-entry trigger | 2.11.3 | |
| bind:beforeleave | eventhandle | no | Trigger before leaving | 2.11.3 | |
| bind:leave | eventhandle | no | Triggered on exit | 2.11.3 | |
| bind:afterleave | eventhandle | no | Triggered after leaving | 2.11.3 | |
| bind:clickoverlay | eventhandle | no | Triggered when the mask layer is clicked | 2.11.3 |
share-element
| attribute | type | Default value | Required | Introductions | Minimum version |
|---|---|---|---|---|---|
| key | string | yes | Mapping marker | 2.11.3 | |
| transform | boolean | false | no | Whether to animate | 2.11.3 |
| duration | number | 300 | no | Animation duration, in milliseconds | 2.11.3 |
| easing-function | string | ease-out | no | css Retarded function | 2.11.3 |