iter(g141): 通知支持四角停靠
This commit is contained in:
+3
-1
@@ -1,6 +1,6 @@
|
||||
# @ui-arch 组件库 Agent 文档(无图形版)
|
||||
|
||||
> 自动生成于 2026-10-26T07:33:59.912Z,数据源:各包 ua.manifest.json,勿手改。人类版文档站:apps/docs/index.html。
|
||||
> 自动生成于 2026-10-26T07:36:09.637Z,数据源:各包 ua.manifest.json,勿手改。人类版文档站:apps/docs/index.html。
|
||||
> 组件 = 普通函数,传 props 返回 DOM;状态用 signal 双向绑定:读 signal() 写 signal(v)。
|
||||
|
||||
## 快速上手
|
||||
@@ -1234,6 +1234,7 @@ upload({ multiple: true, accept: 'image/*', hint: '拖拽图片到此处', onCha
|
||||
- duration:number —— 自动关闭毫秒;缺省 0 = 常驻不自动关,非 0 时悬停 / 聚焦暂停计时
|
||||
- closable:boolean —— 是否显示关闭按钮;缺省 true
|
||||
- action:unknown —— 操作区内容(如按钮);缺省不渲染
|
||||
- placement(默认 bottom-right):'top-right' | 'bottom-right' | 'top-left' | 'bottom-left' —— 停靠角落;每个角落独立堆叠(同角最多 3 条),右上与 toast 同侧,建议次要信息放左侧
|
||||
|
||||
示例:
|
||||
|
||||
@@ -1248,6 +1249,7 @@ const { close } = notification({ title: '导出完成', description: 'report.csv
|
||||
3. 返回 { el, close } 句柄:程序化关闭用 close(),需要自己挂交互就用 el
|
||||
4. action 放操作区(常见为按钮);variant 决定左侧条与圆点语义色
|
||||
5. 与 toast 的分工:toast 右上角轻量瞬时,notification 右下角可长读、可操作
|
||||
6. 停靠角落用 placement 调:四个角各自独立堆叠与节流,顶部角落新通知从屏幕边缘长出、旧的往下让
|
||||
|
||||
现场演示:apps/docs/demo.html#sec-notification
|
||||
|
||||
|
||||
Reference in New Issue
Block a user