Skip to content

Add an example about changing modal content from js #147

Answered by hunterliu1003
vricosti asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @vricosti,

Here is the docs example of Dynamic Modal
https://vue-final-modal.org/dynamic-modal#advanced

Maybe like this, you can checkout the DynamicModalOptions type

import CustomModal from '@/components/CustomModal.vue'

export default {
  methods: {
    showDialog() {
      this.$vfm.show({
        component: CustomModal,
        on: { 
          confirm() { ... },
          cancel() { ... },
        },
        slot: {
          title: '<span>Hello, vue-final-modal</span>',
          default: '<p>Vue Final Modal is a renderless, stackable, detachable and lightweight modal component.</p>'
          // or
          default: {
            component: DefaultSlotComponent,
            bind

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hunterliu1003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants