iter(g36): 新增 result 结果页组件
This commit is contained in:
@@ -644,6 +644,14 @@
|
||||
"acceptance": "notification({ title, description, variant, duration, closable, action }) 右下角堆叠(与 toast 分区)、超出 3 条挤掉最早、返回 { el, close }、duration 0 常驻;组件数 42→43 三处计数同步;npm run check 全绿",
|
||||
"status": "done",
|
||||
"notes": "自补:组件补充;与 toast 分区避免视觉冲突"
|
||||
},
|
||||
{
|
||||
"id": "g36",
|
||||
"title": "新增 result 结果页组件",
|
||||
"motivation": "提交成功/校验失败/权限不足这类终态页每次手写图标+标题+按钮,语义色和留白都不统一",
|
||||
"acceptance": "result({ status, title, description, extra }) 四档语义色 + 居中终态布局 + role=\"status\";组件数 43→44 三处计数同步;npm run check 全绿",
|
||||
"status": "open",
|
||||
"notes": "自补:组件补充"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+38
-2
@@ -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\",插入页面后读屏会播报终态文案"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user