iter(g96): 抽屉支持上下滑出方位

This commit is contained in:
HIsheR
2026-10-26 13:15:00 +08:00
parent 6e6860abab
commit 306fd90ab7
8 changed files with 52 additions and 14 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ export function drawer(props: DrawerProps, ...children: unknown[]): HTMLElement
'aside',
{
class: `ua-drawer ua-drawer-${props.placement ?? 'right'}`,
style: `width:${props.width ?? 320}px`,
style: `${props.placement === 'top' || props.placement === 'bottom' ? 'height' : 'width'}:${props.width ?? 320}px`, // 上下滑出改高度
role: 'dialog',
'aria-labelledby': titleId,
'aria-hidden': () => String(!props.open()),