feat: 表单弹窗提供独立固定底部操作插槽

This commit is contained in:
GouJ committed 2026-09-26 23:12:45 +08:00
1 parent 5a24a9d107
commit b4b101b86b
1 file changed
+7 -2
+7 -2
View File
@@ -22,6 +22,9 @@ const open = defineModel<boolean>('open', { default: false })
<p class="text-sm leading-6 text-muted">{{ description }}</p>
<slot />
</div>
<template v-if="$slots.footer" #footer>
<div class="dialog-footer"><slot name="footer" /></div>
</template>
</NModal>
</template>
@@ -54,8 +57,10 @@ const open = defineModel<boolean>('open', { default: false })
.app-dialog .n-card-header__close:hover {
@apply bg-(--app-subtle);
}
.app-dialog .n-card__footer {
@apply shrink-0;
}
.app-dialog .dialog-footer {
@apply sticky bottom-0 z-10 mt-5 py-4 bg-(--app-surface);
box-shadow: 0 -1px var(--app-border);
@apply flex justify-end gap-2;
}
</style>