Vue中使用mixins

List.js

import ListTitle from '@/components/ListTitle'
import ZgldhDatatables from '@/components/ZgldhDatatables'

var listMixin = {
  components: {
    ListTitle,
    ZgldhDatatables
  },
  data() {
    return {}
  },
  computed: {},
  methods: {}
}

export default listMixin

组件中使用mixin:

import ListMixin from '@/mixins/List'
export default {
  mixins: [ListMixin],
  components: {
    ReaderEditor,
    Echart
  },

 

你可能感兴趣的:(Vue中使用mixins)