main.js 931 B

123456789101112131415161718192021222324252627282930313233
  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 ElementUI from 'element-ui'
  7. import 'element-ui/lib/theme-chalk/index.css'
  8. import '@/assets/css/index.css'
  9. import moment from 'moment'
  10. import './config/rem.js'
  11. // import axios from 'axios';
  12. import './config/globle.js'
  13. import myaxios from '@/plugins/MyAxios'
  14. import MyBreadcrumb from '@/components/MyBreadcrumb'
  15. import 'babel-polyfill'
  16. Vue.use(ElementUI)
  17. Vue.use(myaxios)
  18. Vue.component(MyBreadcrumb.name, MyBreadcrumb)
  19. Vue.filter(`fmtDate`, (value, formatString) => {
  20. formatString = formatString || `YYYY-MM-DD HH:mm:ss`
  21. return moment(value).format(formatString)
  22. })
  23. Vue.config.productionTip = false
  24. new Vue({// eslint-disable-line
  25. el: `#app`,
  26. router,
  27. components: { App },
  28. template: `<App/>`
  29. })