Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
Vue 3 migration how to do extend of a component?

I have a component


const DialogMain = Vue.extend(DialogComponent);

export const alertDialog = (text: string) => {
  const dialog = new DialogMain({
    propsData: {
      type: 'alert'    
    },
  });

  return new Promise(resolve => {
    // resolve reject handle here
    }
  });

So when I migrate the app to Vue3 I get 'extend' does not exist on type 'typeof import('....') error. I know since the global Vue is no longer a new-able constructor, Vue.extend no longer makes sense in terms of constructor extension. But I am not sure how to write it with defineComponent. Is it should be like

   const dialogMain = defineComponent({extends: DialogComponent})

Will it be same as Vue.extend?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Have you tried to just use the component options as is?

const DialogMain = defineComponent(DialogComponent)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!