No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    How to load page or components in Qdialog?

    Help
    1
    1
    103
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      ebena last edited by

      Is there any way to load or render components into Qdialog? Please I need to know if it is possible and if any example/sample of such methods is available

      A scenario.

      <q-toolbar>
         <q-select v-model="event" :option="eventtype" @input="onEventChange()" label="Select Event" />
      </q-toolbar>
      
      <q-dialog>
      
      </q-dialog>
      

      And in the script,

      <script>
      import eventList from 'statics/data/event.json'
      
      export default {
          data () {
               return {
                   event: null,
                   dialog: false,
                   app: {
                      title: ' '
                      url: ' '
               }
         },
       computed: {
           eventtype () {
               return eventList
          }
      },
      methods: {
        onEventChange () {
          if (this.event === "New Entry" {
             this.app.title = 'New Entry Form'
             this.app.url = 'components/forms/newEntryForm.Vue'
      } else  if (this.event === "Edit Entry" {
            this.app.title = 'Edit User details'
            this.app.url = 'components/forms/editForm.Vue'
      }
      
      }
      </script>
      

      Question
      How can I use Qdialog to load either newEntryForm.vue or editForm.vue depending on event selected by the user?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post