组件参考

组件

组件表由运行时注册表生成。Agent、校验器、渲染器和文档站共享这份组件事实。

组件分类状态常用属性事件用途
audio能力协议优先id, class, style, hidden, data-*, idbindplay, bindpause, bindended, binderror, bindload音频播放组件,配合 ac.playMedia 等媒体 API 控制。
button动作稳定id, class, style, hidden, data-*, typebindtap, bindsubmit触发用户操作、表单提交或点击事件的按钮。
camera能力宿主能力id, class, style, hidden, data-*, device-positionbinderror, bindload相机预览占位组件,由宿主相机 provider 提供真实能力。
canvas能力协议优先id, class, style, hidden, data-*, canvas-idbindtap, bindtouchstart, bindtouchmove, bindtouchend可绘制画布,通过 ac.drawCanvas 等宿主 API 控制。
card布局稳定id, class, style, hidden, data-*bindtap用于承载一组相关内容的卡片容器。
checkbox表单稳定id, class, style, hidden, data-*, namebindchange单个复选项,可独立使用或放入 checkbox-group。
checkbox-group表单稳定id, class, style, hidden, data-*, namebindchange复选框组,将多个选中值汇总为数组。
code-editor表单稳定id, class, style, hidden, data-*, editor-idbindinput, bindchange, bindconfirm, bindfocus, bindblur, bindscroll, bindselectionchange, bindkeydown代码编辑区域,适合 Mermaid 等 DSL 输入,并提供输入和选区事件。
cover-image媒体稳定id, class, style, hidden, data-*, srcbindtap, bindload, binderror覆盖层图片组件,用于需要浮层叠放的媒体内容。
cover-view布局稳定id, class, style, hidden, data-*bindtap, bindtouchstart, bindtouchmove, bindtouchend覆盖层视图容器,可承载浮层内容。
diagram-view能力协议优先id, class, style, hidden, data-*, diagram-idbindtap, bindtouchstart, bindtouchmove, bindtouchend, bindpointerdown, bindpointermove, bindpointerup, bindwheel, bindcontextmenu安全 SVG 图表预览区域,可配合 ac.renderMermaid 渲染 Mermaid。
empty反馈稳定id, class, style, hidden, data-*bindtap空状态展示组件。
form表单稳定id, class, style, hidden, data-*bindsubmit表单容器,提交时收集子控件值到 event.detail.value。
icon内容稳定id, class, style, hidden, data-*, typebindtap小型语义图标标记。
image媒体稳定id, class, style, hidden, data-*, srcbindtap, bindload, binderror图片资源展示组件。
input表单稳定id, class, style, hidden, data-*, namebindinput, bindchange, bindconfirm, bindfocus, bindblur单行文本输入控件。
label表单稳定id, class, style, hidden, data-*, forbindtap表单标签,可通过 for 关联控件。
list布局稳定id, class, style, hidden, data-*bindtap列表容器。
list-item布局稳定id, class, style, hidden, data-*bindtap列表项容器。
loading反馈稳定id, class, style, hidden, data-*-加载状态展示组件。
map能力宿主能力id, class, style, hidden, data-*, latitudebindregionchange, bindmarkertap, bindtap地图占位组件,由宿主地图 provider 提供真实能力。
match-media布局稳定id, class, style, hidden, data-*, min-width-按媒体条件展示内容的响应式容器。
modal反馈稳定id, class, style, hidden, data-*, showbindtap模态弹窗容器。
movable-area布局稳定id, class, style, hidden, data-*, scale-areabindtap可拖拽区域容器。
movable-view布局稳定id, class, style, hidden, data-*, xbindtap, bindchange, bindtouchstart, bindtouchmove, bindtouchend可移动视图,支持位置变化和触摸事件。
navbar导航稳定id, class, style, hidden, data-*, titlebindtap页面导航栏组件。
navigator导航稳定id, class, style, hidden, data-*, urlbindtap容器内路由跳转组件。
page-container覆盖层稳定id, class, style, hidden, data-*, showbindtap, bindbeforeenter, bindenter, bindafterenter, bindbeforeleave, bindleave, bindafterleave页面级弹出容器,支持进入和离开生命周期事件。
picker表单稳定id, class, style, hidden, data-*, namebindchange单列选择器,基于 range 数据选择值。
picker-view表单稳定id, class, style, hidden, data-*, valuebindchange, bindpickstart, bindpickend嵌入式滚动选择器。
picker-view-column表单稳定id, class, style, hidden, data-*-picker-view 的列容器。
progress反馈稳定id, class, style, hidden, data-*, percent-进度展示组件,百分比会限制在 0 到 100。
radio表单稳定id, class, style, hidden, data-*, namebindchange单个单选项。
radio-group表单稳定id, class, style, hidden, data-*, namebindchange单选组,将选中项汇总为单个值。
rich-text内容稳定id, class, style, hidden, data-*, nodesbindtap渲染经过安全处理的富文本字符串或节点数组。
root-portal覆盖层稳定id, class, style, hidden, data-*bindtap根层传送容器,用于浮层内容。
safe-area布局稳定id, class, style, hidden, data-*bindtap适配安全区域的布局容器。
scroll-view布局稳定id, class, style, hidden, data-*, scroll-xbindtap, bindscroll, bindscrolltoupper, bindscrolltolower可滚动内容区域。
slider表单稳定id, class, style, hidden, data-*, namebindchange滑块控件,返回数值型 event.detail.value。
swiper布局稳定id, class, style, hidden, data-*, currentbindchange轮播容器。
swiper-item布局稳定id, class, style, hidden, data-*, item-idbindtap轮播项容器。
switch表单稳定id, class, style, hidden, data-*, namebindchange布尔开关控件。
tab导航稳定id, class, style, hidden, data-*, valuebindtap单个标签页项。
tabs导航稳定id, class, style, hidden, data-*, currentbindchange标签页组,支持当前项切换。
text内容稳定id, class, style, hidden, data-*bindtap行内文本内容。
textarea表单稳定id, class, style, hidden, data-*, namebindinput, bindchange, bindconfirm, bindfocus, bindblur多行文本输入控件。
toast反馈稳定id, class, style, hidden, data-*-轻量提示展示组件。
video能力协议优先id, class, style, hidden, data-*, idbindplay, bindpause, bindended, binderror, bindload视频播放组件,配合 ac.playMedia 等媒体 API 控制。
view布局稳定id, class, style, hidden, data-*bindtap, bindtouchstart, bindtouchmove, bindtouchend通用布局容器。
web-view能力协议优先id, class, style, hidden, data-*, srcbindload, binderror嵌入白名单 HTTPS 页面的小程序内容区域。