Skip to content

Commit

Permalink
docs: scoped slots close
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterliu1003 committed Dec 7, 2023
1 parent e6ed697 commit cfe57e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/content/3.api/1.components/1.vue-final-modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,16 @@ When set `:preventNavigationGestures="true"`{lang=ts}, there will be two invisib

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

You can also use scoped slots to close modal, for example:

```html
<VueFinalModal>
<template #default="{ close }">
<button @click="() => close()">
Cancel
</button>
</template>
</VueFinalModal>
```

- The `swipe-banner`{lang=ts} slot can be used to define the area that can be swipe to close

0 comments on commit cfe57e0

Please sign in to comment.