Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async component #31

Open
RezaErfani67 opened this issue Apr 30, 2020 · 2 comments
Open

async component #31

RezaErfani67 opened this issue Apr 30, 2020 · 2 comments

Comments

@RezaErfani67
Copy link

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

@TerryZ
Copy link
Owner

TerryZ commented Dec 17, 2020

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,
      }
    });
  },

@RezaErfani67
Copy link
Author

RezaErfani67 commented Jun 29, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants