iter(g36): 新增 result 结果页组件

This commit is contained in:
HIsheR
2026-10-26 11:47:48 +08:00
parent f1703b3e68
commit 8ac71c4efd
13 changed files with 195 additions and 9 deletions
+38 -2
View File
@@ -1,6 +1,6 @@
{
"$schema": "ui-arch-registry-index/0.1",
"generatedAt": "2026-10-26T03:46:32.583Z",
"generatedAt": "2026-10-26T03:47:28.088Z",
"repoRoot": ".",
"packages": [
{
@@ -186,7 +186,8 @@
"carousel(props):轮播,items 横排位移,指示点/箭头/←→ 键切换,autoplay 毫秒自动前进且悬停暂停,index 信号可外部受控",
"tree(props):树形,递归节点 + 箭头展开/收起 + 点选节点,键盘 Enter 选中、→ 展开、← 收起,禁用节点不响应",
"upload(props):文件选择,点击或拖拽入列,清单可逐个移除,onChange 回传文件数组(不内置上传请求)",
"notification(props):右下角通知卡片(标题 + 描述 + 操作区),返回 { el, close } 句柄,缺省常驻需手动关闭"
"notification(props):右下角通知卡片(标题 + 描述 + 操作区),返回 { el, close } 句柄,缺省常驻需手动关闭",
"result(props):结果页,status 四档语义色 + 标题 + 说明 + 操作区,用于提交完成/校验失败等终态"
],
"keyTypes": [
"ButtonProps",
@@ -1993,6 +1994,41 @@
"action 放操作区(常见为按钮);variant 决定左侧条与圆点语义色",
"与 toast 的分工:toast 右上角轻量瞬时,notification 右下角可长读、可操作"
]
},
{
"id": "result",
"title": "结果页 Result",
"demo": "sec-result",
"props": [
{
"n": "status",
"t": "'success' | 'warning' | 'danger' | 'info'",
"d": "终态语义色(图标底色);缺省 info"
},
{
"n": "title",
"t": "string",
"r": 1,
"d": "主标题"
},
{
"n": "description",
"t": "string",
"d": "补充说明;缺省不渲染"
},
{
"n": "extra",
"t": "unknown",
"d": "操作区内容(常见为主次按钮);缺省不渲染"
}
],
"example": "result({ status: 'success', title: '提交成功', description: '工单 #2049 已受理', extra: button({ label: '查看工单', variant: 'primary', onClick: () => go() }) })",
"steps": [
"status 决定图标底色(success 绿 / warning 黄 / danger 红 / info 蓝),整体居中排布",
"title 必填;description 用于说明原因或下一步,超过一行自动居中换行",
"extra 放操作区,常见为主按钮 + 幽灵按钮;不传则不渲染",
"组件自带 role=\"status\",插入页面后读屏会播报终态文案"
]
}
]
},