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

131
Views
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
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!