iter(g175): 确认气泡支持异步确认
This commit is contained in:
@@ -1370,6 +1370,12 @@ const content = h(
|
||||
onCancel: () => toast.info('已取消'),
|
||||
}, button({ label: '删除记录', variant: 'danger' })),
|
||||
popconfirm({ title: '发布到生产?', description: '发布后 1 分钟内全量生效。', confirmText: '发布', onConfirm: () => toast.success('已发布') }, button({ label: '发布', variant: 'ghost' })),
|
||||
popconfirm({ // 异步确认:Promise 期间按钮转「处理中…」并禁用,成功才收起
|
||||
title: '归档这批任务?',
|
||||
description: '调用后端需要约 1 秒,期间按钮保持 loading,失败则留在气泡里可重试。',
|
||||
confirmText: '归档',
|
||||
onConfirm: async () => { await new Promise((r) => setTimeout(r, 1000)); toast.success('已归档'); },
|
||||
}, button({ label: '归档(异步)', variant: 'ghost' })),
|
||||
),
|
||||
section(
|
||||
'sec-calendar',
|
||||
|
||||
Reference in New Issue
Block a user