Skip to content

Commit cfe57e0

Browse files
committed
docs: scoped slots close
1 parent e6ed697 commit cfe57e0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/content/3.api/1.components/1.vue-final-modal.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,16 @@ When set `:preventNavigationGestures="true"`{lang=ts}, there will be two invisib
240240

241241
- The `default`{lang=ts} slot can be used to render the modal content.
242242

243+
You can also use scoped slots to close modal, for example:
244+
245+
```html
246+
<VueFinalModal>
247+
<template #default="{ close }">
248+
<button @click="() => close()">
249+
Cancel
250+
</button>
251+
</template>
252+
</VueFinalModal>
253+
```
254+
243255
- The `swipe-banner`{lang=ts} slot can be used to define the area that can be swipe to close

0 commit comments

Comments
 (0)