iter: d11 modal 补 size 档位与 footer 操作区
This commit is contained in:
+14
-3
@@ -241,9 +241,20 @@ const content = h(
|
||||
h('span', { class: 'out' }, () => `当前页签:${activeTab()}`),
|
||||
button({ label: '打开弹窗', onClick: () => modalOpen(true) }),
|
||||
modal(
|
||||
{ title: '确认操作', open: modalOpen, onClose: () => modalOpen(false) },
|
||||
h('p', null, '这是一个由信号驱动的弹窗组件。'),
|
||||
h('div', { class: 'row' }, button({ label: '知道了', onClick: () => modalOpen(false) }), badge({ label: 'modal', variant: 'success' })),
|
||||
{
|
||||
title: '确认操作',
|
||||
open: modalOpen,
|
||||
size: 'lg',
|
||||
onClose: () => modalOpen(false),
|
||||
footer: h(
|
||||
'div',
|
||||
{ class: 'row' },
|
||||
button({ label: '取消', variant: 'ghost', onClick: () => modalOpen(false) }),
|
||||
button({ label: '确定', onClick: () => { modalOpen(false); toast.success('已确认'); } }),
|
||||
),
|
||||
},
|
||||
h('p', null, '这是一个由信号驱动的弹窗组件(size: lg + footer 操作区)。'),
|
||||
h('div', { class: 'row' }, badge({ label: 'modal', variant: 'success' }), badge({ label: 'footer', variant: 'default' })),
|
||||
),
|
||||
),
|
||||
section(
|
||||
|
||||
Reference in New Issue
Block a user