main.js 635 B

123456789101112131415161718192021222324
  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. import { Message } from 'element-ui'
  9. Vue.config.productionTip = false
  10. import { Form } from 'element-ui'
  11. Vue.prototype.$store = store;// 将store实例挂在vue原型上
  12. Vue.prototype.ajax = ajax
  13. Vue.prototype.$message = Message
  14. /* eslint-disable no-new */
  15. new Vue({
  16. el: '#app',
  17. router,
  18. components: { App },
  19. template: '<App/>'
  20. })