main.js 530 B

123456789101112131415161718192021
  1. // The Vue build version to load with the `import` command
  2. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
  3. import Vue from 'vue'
  4. import App from './App'
  5. import router from './router'
  6. import store from './config/config'
  7. import ajax from './common/axios.config'
  8. Vue.config.productionTip = false
  9. Vue.prototype.$store = store;// 将store实例挂在vue原型上
  10. Vue.prototype.ajax = ajax
  11. /* eslint-disable no-new */
  12. new Vue({
  13. el: '#app',
  14. router,
  15. components: { App },
  16. template: '<App/>'
  17. })