组件清单
取值范围
组件树上限:500 个节点 / 32 层嵌套 / 256 KB。
示例
action 会作为 ctx.action_id 传进 onAction;input 和 select 的值会收进 ctx.inputs。Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
blocks 小程序可用的全部组件、属性与取值范围
| 组件 | 属性 |
|---|---|
vstack hstack | gap align padding + children |
zstack | align + children |
text | value size weight align |
button | label icon variant action disabled |
image | url width height fit alt |
icon | name size |
spacer | size |
divider | — |
progress | value max |
input | name placeholder value |
select | name value options |
| 属性 | 可选值 |
|---|---|
size / gap / padding | xs small medium large xl |
align | start center end stretch |
weight | regular medium bold |
variant | primary secondary danger flat |
fit | contain cover fill |
E_INVALID_BLOCKS 拒绝这次调用。{
type: "vstack",
gap: "small",
padding: "medium",
children: [
{ type: "text", value: "全场最高分", weight: "bold", size: "large" },
{ type: "divider" },
{ type: "progress", value: 40, max: 100 },
{
type: "hstack",
gap: "small",
children: [
{ type: "button", label: "加注", action: "raise", variant: "primary" },
{ type: "button", label: "弃牌", action: "fold", variant: "flat" },
],
},
],
}
action 会作为 ctx.action_id 传进 onAction;input 和 select 的值会收进 ctx.inputs。此页面对您有帮助吗?
