v-dialogs icon indicating copy to clipboard operation
v-dialogs copied to clipboard

async component

Open RezaErfani67 opened this issue 4 years ago • 2 comments

if i write async component, show Vue Warn

  async openReferral(mailID) {
                let that = this;
                let addReferral= async ()=>{return  await import('../../referral/referralTask/add.vue')}
                that.$dlg.modal(addReferral, {width: 800, height: 750, title: "add task"
                    params: {
                    mailID :mailID,
                    }});
            },

image

RezaErfani67 avatar Apr 30 '20 05:04 RezaErfani67

Try below

  async openReferral(mailID) {
    let that = this;
    let addReferral= async ()=>{return  await import('../../referral/referralTask/add.vue')}
    that.$dlg.modal(addReferral(), {width: 800, height: 750, title: "add task"
      params: {
        mailID :mailID,
      }
    });
  },

TerryZ avatar Dec 17 '20 08:12 TerryZ

return error

vue.esm.js?a026:628 [Vue warn]: Invalid prop: type check failed for prop "component". Expected Object, Function, got Promise [Vue warn]: Failed to mount component: template or render function not defined VM2541:15 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:8080/commercial/cmcProduct/add.vue

image

RezaErfani67 avatar Jun 29 '21 07:06 RezaErfani67