main.js 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import Vue from 'vue'
  2. import 'normalize.css/normalize.css'// A modern alternative to CSS resets
  3. import Element from 'element-ui'
  4. import 'element-ui/lib/theme-chalk/index.css'
  5. import '@/utils/directives.js'
  6. import '@/styles/index.scss' // global css
  7. import '@/styles/variables.scss' // global css
  8. import '@/assets/iconfont/iconfont.css'
  9. import '@/assets/icon/iconfont.css'
  10. import { Message } from 'element-ui'
  11. import App from './App'
  12. import router from './router'
  13. import store from './store'
  14. import { Base64 } from 'js-base64'
  15. import i18n from './lang' // Internationalization
  16. import './icons' // icon
  17. import './errorLog'// error log
  18. // import './permission' // permission control
  19. import './xt_permission'
  20. // import './mock' // simulation data
  21. import * as filters from './filters' // global filters
  22. //引入mint-ui
  23. import Mint from 'mint-ui';
  24. Vue.use(Mint);
  25. //引入无线滚条
  26. import vuescroll from 'vuescroll'
  27. import { read } from 'fs';
  28. import 'vuescroll/dist/vuescroll.css';
  29. import 'swiper/dist/css/swiper.min.css'
  30. import BaiduMap from 'vue-baidu-map'
  31. Vue.use(vuescroll)
  32. Vue.use(Element, {
  33. size: 'medium', // set element-ui default size
  34. i18n: (key, value) => i18n.t(key, value)
  35. })
  36. // register global utility filters.
  37. Object.keys(filters).forEach(key => {
  38. Vue.filter(key, filters[key])
  39. })
  40. Vue.config.productionTip = false
  41. new Vue({
  42. el: '#app',
  43. router,
  44. store,
  45. i18n,
  46. render: h => h(App)
  47. })
  48. Vue.prototype.Base64 = require('js-base64').Base64
  49. Vue.use(BaiduMap, {
  50. // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
  51. ak: 'YOUR_APP_KEY'
  52. })