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

137
Views
Después de importar diferentes mixin pero agregar solo uno en la instancia de vue, ¿cómo se agregan todos los mixin?

En el directorio de mi proyecto creado en vue 2, el archivo main.js está importando mixin pero no está agregando el mixin en la instancia de vue. Sin embargo, puedo ver que todo el mixin está disponible en los componentes, no entiendo cómo es importar el objeto agregue el mixin, es This usando el cierre de alguna manera. amablemente ayuda

Mi main.js se ve así

 import Vue from "vue"; const App = () => import("./App"); // Mixins import QuoteFlowHelper from "./mixins/quote_flow_helper"; import "./mixins/number_utils"; import "./mixins/countries"; import "./mixins/coverage_amounts"; import "./mixins/customized_quote_helper";``` import "./mixins/date_utils"; import "./mixins/email_validation_methods"; import "./mixins/errors"; import "./mixins/health_period_mapper"; new Vue({ el: "#app", mounted() { if(!this.inIframe()) this.loadThirdPartyScripts(); }, router, store, i18n, mq: { desktop: "(min-width: 1024px)", tablet: "(min-width: 768px) and (max-width: 1023px)", phone: "(max-width: 767px)" }, components: { App }, mixins: { QuoteFlowHelper }, template: "<App/>" })

El archivo mixin es como se muestra a continuación.

 import Vue from "vue"; const Countries = Vue.mixin({ methods: { countries() { return [ { value: "Wallis and Futuna", label: "Wallis and Futuna" }, { value: "Western Sahara", label: "Western Sahara" }, { value: "Yemen", label: "Yemen" }, { value: "Zambia", label: "Zambia" }, { value: "Zimbabwe", label: "Zimbabwe" } ]; }, } }); export default Countries;
about 4 years ago · Juan Pablo Isaza
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!