Scoped Slots

close

  • type: Function

When you are using vue-final-modal as a HOC. you can close modal with scoped-slot:

<template>
  <vue-final-modal v-slot="{ close }" v-bind="$attrs" v-on="$listeners">
    <div>Hello Vue Final Modal</div>
    <button @click="close">close modal</button>
  </vue-final-modal>
</template>

<script>
export default {
  name: 'VueFinalModal',
  inheritAttrs: false
}
</script>

params

  • type: Any
  • default: {}

When you open a modal though the API $vfm.show(name, params), you can get params with scoped-slot:

<template v-slot="{ params }">
  <!-- modal content -->
</template>
Edit this page on GitHub Updated at Fri, Feb 3, 2023