feat(dialog): add showFooter prop to control footer visibility

This commit is contained in:
Hakadao
2024-07-10 01:08:12 +08:00
parent 37b081abd5
commit e44bda0794

View File

@@ -14,12 +14,14 @@ const props = withDefaults(defineProps<{
maxWidth?: string | number
contentHeight?: string | number
contentMaxHeight?: string | number
showFooter?: boolean
centerFooter?: boolean
loading?: boolean
preventCloseWhenLoading?: boolean
}>(), {
preventCloseWhenLoading: true,
frostedGlass: true,
showFooter: true,
})
const emit = defineEmits(['close', 'confirm'])
@@ -175,6 +177,7 @@ function handleConfirm() {
<slot />
</main>
<footer
v-if="showFooter"
:style="{ justifyContent: centerFooter || center ? 'center' : 'flex-end' }"
flex="~ gap-2" p="x-8 t-2 b-6"
>