diff --git a/docs/app/components/content/examples/modal/ModalFooterSlotExample.vue b/docs/app/components/content/examples/modal/ModalFooterSlotExample.vue index 08047cbcb7..ab9dfc7e68 100644 --- a/docs/app/components/content/examples/modal/ModalFooterSlotExample.vue +++ b/docs/app/components/content/examples/modal/ModalFooterSlotExample.vue @@ -10,8 +10,8 @@ const open = ref(false) - - diff --git a/playground/app/pages/components/slideover.vue b/playground/app/pages/components/slideover.vue index c14e196c50..c10326a0b8 100644 --- a/playground/app/pages/components/slideover.vue +++ b/playground/app/pages/components/slideover.vue @@ -125,5 +125,21 @@ function openSlideover() { + + + + + + + + + + diff --git a/src/runtime/components/Modal.vue b/src/runtime/components/Modal.vue index 7108b6012f..b56b5f23b7 100644 --- a/src/runtime/components/Modal.vue +++ b/src/runtime/components/Modal.vue @@ -61,13 +61,13 @@ export interface ModalEmits extends DialogRootEmits { export interface ModalSlots { default(props: { open: boolean }): any - content(props?: {}): any - header(props?: {}): any + content(props: { close: () => void }): any + header(props: { close: () => void }): any title(props?: {}): any description(props?: {}): any - close(props: { ui: { [K in keyof Required]: (props?: Record) => string } }): any - body(props?: {}): any - footer(props?: {}): any + close(props: { close: () => void, ui: { [K in keyof Required]: (props?: Record) => string } }): any + body(props: { close: () => void }): any + footer(props: { close: () => void }): any } @@ -124,8 +124,9 @@ const ui = computed(() => tv({ extend: tv(theme), ...(appConfig.ui?.modal || {}) })) +