iter: d11 modal 补 size 档位与 footer 操作区

This commit is contained in:
ui-arch-bot
2026-10-23 16:54:36 +08:00
parent a08f157e5e
commit d1a2864470
10 changed files with 76 additions and 12 deletions
+2 -1
View File
@@ -16,9 +16,10 @@ export function modal(props: ModalProps, ...children: unknown[]): HTMLElement {
});
const box = h(
'div',
{ class: 'ua-modal' },
{ class: `ua-modal ua-modal-${props.size ?? 'md'}` },
h('div', { class: 'ua-modal-head' }, h('h3', { class: 'ua-modal-title' }, props.title), h('button', { class: 'ua-modal-close', onClick: close }, '×')),
h('div', { class: 'ua-modal-body' }, ...children),
props.footer ? h('div', { class: 'ua-modal-foot' }, props.footer) : null, // 底部操作区:右对齐,仅传了才渲染
);
overlay.append(box);
effect(() => {