fix: 仅提交型弹窗启用固定三段高度布局

This commit is contained in:
GouJ committed 2026-09-26 23:30:03 +08:00
1 parent 1c22f7d5f8
commit 6df91eb9b6
1 file changed
+9 -3
+9 -3
View File
@@ -14,7 +14,7 @@ const open = defineModel<boolean>('open', { default: false })
:mask-closable="!busy"
:close-on-esc="!busy"
:style="{ width: wide ? '1040px' : '600px' }"
class="app-dialog"
class="app-dialog" :class="{ 'app-dialog--with-footer': $slots.footer }"
role="dialog"
:aria-label="title"
>
@@ -36,7 +36,10 @@ const open = defineModel<boolean>('open', { default: false })
--app-field-hover: var(--app-control-hover);
}
.app-dialog {
@apply max-w-[calc(100vw-32px)] h-[min(760px,calc(100dvh-32px))] max-h-[calc(100dvh-32px)] flex flex-col overflow-hidden;
@apply max-w-[calc(100vw-32px)] max-h-[calc(100dvh-32px)] flex flex-col overflow-hidden;
}
.app-dialog--with-footer {
height: min(760px, calc(100dvh - 32px));
}
.app-dialog .n-card-header {
@apply shrink-0;
@@ -45,7 +48,10 @@ const open = defineModel<boolean>('open', { default: false })
@apply min-h-0 h-full;
}
.app-dialog .n-card__content {
@apply min-h-0 flex-1 overflow-hidden;
@apply min-h-0 overflow-hidden;
}
.app-dialog--with-footer .n-card__content {
@apply flex-1;
height: 0;
}
.app-dialog .n-card-header__close {