Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

134
Vistas
After importing different mixin but adding just one in vue instance, How are all the mixin getting added?

In my project directory built on vue 2 , the main.js file is importing mixin but its not adding the mixin in the vue instance, However I can see all the mixin being avilable in the components, I am not understanding how importing the object is add the mixin, is This using closure in someway. kindly help.

My main.js look like this

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/>"
})

The mixin file is as shown below

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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda