You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

72 lines
1.6 KiB

  1. import 'babel-polyfill'
  2. import 'classlist-polyfill'
  3. import Vue from 'vue'
  4. import axios from './router/axios'
  5. import VueAxios from 'vue-axios'
  6. import App from './App'
  7. import './permission' // 权限
  8. import './error' // 日志
  9. import './cache'//页面缓冲
  10. import router from './router/router'
  11. import store from './store'
  12. import { loadStyle } from './util/util'
  13. import * as urls from '@/config/env'
  14. import { iconfontUrl, iconfontVersion } from '@/config/env'
  15. import * as filters from './filters' // 全局filter
  16. import ElementUI from 'element-ui'
  17. import 'element-ui/lib/theme-chalk/index.css'
  18. import './styles/common.scss'
  19. import AvueFormDesign from '@sscfaith/avue-form-design'
  20. import basicContainer from './components/basic-container/main'
  21. import api from './api'
  22. import AudioPlayer from '@liripeng/vue-audio-player'
  23. import '@liripeng/vue-audio-player/lib/vue-audio-player.css'
  24. // 插件 json 展示
  25. Vue.use(router)
  26. Vue.use(AvueFormDesign);
  27. Vue.use(AudioPlayer)
  28. window.axios = axios
  29. Vue.use(VueAxios, axios)
  30. Vue.use(api) // 注册使用API模块
  31. Vue.use(ElementUI, {
  32. size: 'small',
  33. menuType: 'text'
  34. })
  35. Vue.use(AVUE, {
  36. size: 'small',
  37. menuType: 'text'
  38. })
  39. // 注册全局容器
  40. Vue.component('basicContainer', basicContainer)
  41. // 加载相关url地址
  42. Object.keys(urls).forEach(key => {
  43. Vue.prototype[key] = urls[key]
  44. })
  45. // 加载过滤器
  46. Object.keys(filters).forEach(key => {
  47. Vue.filter(key, filters[key])
  48. })
  49. // 动态加载阿里云字体库
  50. iconfontVersion.forEach(ele => {
  51. loadStyle(iconfontUrl.replace('$key', ele))
  52. })
  53. Vue.config.productionTip = false
  54. new Vue({
  55. router,
  56. store,
  57. render: h => h(App)
  58. }).$mount('#app')