monteecristoo’s blog

https://twitter.com/irakaarozo

Vue.js: share funcitons and data etc each component -- Mixin

@someMixin.js

export const someMixin = {
  data() {
    return {
    

    },

  methods: {

 

  },

  computed() {

  }

 

@someComponent.vue

import { someMixin } from './someMixin';

 

export default {

 mixins: [someMixin]

}

#174

global mixin はすべてのsingle vue instance 生成時に影響が出るので注意

mixin life cycle

f:id:monteecristoo:20170826202902j:plain