| Category | Feature | W3C Spec | QuickApp (Xiaomi, Huawei) | Alipay Mini Program | Baidu Smart Mini Program |
|---|---|---|---|---|---|
| Built-in Comp. | div | <div> |
<div> |
|
|
| Built-in Comp. | span | <span> |
<span> |
||
| Built-in Comp. | stack | <stack> |
|
|
|
| Built-in Comp. | carousel | <swiper> |
<swiper> |
|
|
| Built-in Comp. | tabs | OpenUI research |
|
|
|
| Built-in Comp. | refresh | <refresh> |
|||
| Built-in Comp. | icon | OpenUI research | <icon> |
<icon> |
|
| Built-in Comp. | progress | <progress> |
<progress> |
<progress> |
<progress> |
| Built-in Comp. | anchor | a |
a |
<navigator> |
<navigator> |
| Built-in Comp. | text | <span> |
<text> |
|
|
| Built-in Comp. | text input | <input> |
<input> |
<input> |
<input> |
| Built-in Comp. | camera |
|
<camera> |
<camera> |
|
| Built-in Comp. | textarea | <textarea> |
<textarea> |
<textarea> |
|
| Built-in Comp. | checkbox |
|
<input type="checkbox"> |
|
|
| Built-in Comp. | radio | <input type="radio"> |
<input type="radio"> |
|
|
| Built-in Comp. | form | <form> |
<form> |
<form> |
|
| Built-in Comp. | button | <button> |
<input type="button"> |
<button> |
<button> |
| Built-in Comp. | label | <label> |
<label> |
<label> |
<label> |
| Built-in Comp. | select |
|
|
|
|
| Built-in Comp. | slider | <input> |
<slider> |
<slider> |
<slider> |
| Built-in Comp. | switch | OpenUI research | <switch> |
<switch> |
<switch> |
| Built-in Comp. | picker | OpenUI proposal | <picker> |
|
|
| Built-in Comp. | image | <img> |
<image> |
<image> |
<image> |
| Built-in Comp. | audio | <audio> |
<audio> |
||
| Built-in Comp. | video | <video> |
<video> |
<video> |
|
| Built-in Comp. | canvas | <canvas> |
<canvas> |
<canvas> |
<canvas> |
| Built-in Comp. | animation | <lottie> |
<lottie> |
|
|
| Built-in Comp. | web-view | <html> |
<web> |
<web-view> |
<web-view> |
| Built-in Comp. | map |
|
<map> |
<map> |
|
| Built-in Comp. | list |
|
|||
| Built-in Comp. | popup | <dialog> |
<popup> |
||
| Built-in Comp. | rtc-room |
|
|||
| Built-in Comp. | ad | <ad> |
|||
| Built-in Comp. | payment | <inline-payment-panel> |
|||
| Built-in Comp. | comments |
|
|||
| Built-in Comp. | like | <like> |
|||
| Built-in Comp. | 3d-model | <model> (WIP) |
<modelviewer> |
||
| Built-in Comp. | rating | <rating> |
|||
| Built-in Comp. | marquee | <marquee> (deprecated) |
<marquee> |
||
| Built-in Comp. | share-button | <share-button> |
|||
| Built-in Comp. | drawer |
|
|||
| Built-in Comp. | match-media | <match-media> |
|||
| Built-in Comp. | aria-component | <aria-component> |
|||
| Built-in Comp. | page metadata | <page-meta> |
|||
| Data binding | Text interpolation |
Vue.js-like approach under the same .ux document.
More information.
|
Dynamic data in AXML is bound to the Page corresponding data content.
More information.
|
The rendering layer binds data through a SWAN template.
More information.
|
|
| Templates | Definition | <template>, <slot> |
|
AXML’s
|
SWAN document with elements
More information.
|
| Templates | Use | template.content |
|
AXML’s
|
Declaration in configuration document
More information.
|
| Parameters | Definition | Attributes |
Components define properties as
|
Components define properties as
|
Use of
|
| Parameters | Use | Attributes |
|
|
|
| Events | Binding | addEventListener, event handlers |
|||
| Events | Listener | function() declaration |
|
|
|
| Events | Basic event types | event types |
basic eventstouchstart,
touchmove,
touchend,
touchcancel,
click,
longpress,
focus,
blur,
appear,
disappear,
swipe,
resize
More information. |
||
| Events | Interface properties | Standard properties |
Properties of the event objecttype,
timeStamp,
target,
currentTarget,
detail,
touches,
changedTouches
More information. |
||
| Styles | CSS profile | Standard CSS |
Based on CSS3 + preprocessingSupports LESS and SASS.Only supports a subset of selectors and properties, and the following units: px,
dp (device independent pixels), and %.See the specification. |
ACSS, compatible with CSS3Profile based on CSS, addingrpx (responsive pixel), and a specific page selector.See the specification. |
|
| Styles | Inline declaration | style attribute |
<template> <div style="flex-direction: column;"> </div> </template>
|
// Within the template <view style="color:#ffffff“ />
|
// Within the .swan file <view style="color: #ffffff"> swan </view>
|
| Styles | Import stylesheet | @import |
<style> @import './style.css'; </style>
|
// within a .acss document @import "./button.acss" ; @import "/common/button.acss" ;
|
// Within the .css document @import "header.css";
|
| Component interface | Properties | HTMLElement interface |
Predefined propertiesdata,
props,
is,
$id,
router,
pageRouter,
$page (access the page)See more information. |
||
| Component interface | Methods | HTMLElement interface |
Predefined methods$valid,
$visible,
$attrs,
$listeners,
$element,
$root,
$parent,
$child,
$nextTick,
$forceUpdateSee more information. |
Predefined methodssetData,
$spliceData,
createSelectorQuery,
createIntersectionObserver,
selectOwnerComponent,
selectComponsedParentComponentSee more information. |
Predefined propertiessetData,
hasBehavior,
triggerEvent ,
createSelectorQuery,
createIntersectionObserver,
selectComponent,
selectAllComponents,
groupSetDataSee more information. |