iter(g112): 消息提示支持撤销类操作

This commit is contained in:
HIsheR
2026-10-26 14:05:38 +08:00
parent bf1bd2241b
commit 5372fdd1f3
8 changed files with 68 additions and 5 deletions
+1
View File
@@ -422,6 +422,7 @@ const content = h(
button({ label: '警告', onClick: () => toast.warning('磁盘空间不足') }),
button({ label: '信息(1.5s)', onClick: () => toast.info('已同步云端', 1500) }),
button({ label: '可关闭', variant: 'ghost', onClick: () => showToast({ message: '这条可以手动关掉', variant: 'warning', closable: true }) }),
button({ label: '带撤销', variant: 'ghost', onClick: () => showToast({ message: '已删除 3 条记录', variant: 'success', actionLabel: '撤销', duration: 5000, onAction: () => toast.info('已撤销删除') }) }),
),
),
section(