赫艾前端
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.

55 lines
1.8 KiB

4 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
3 years ago
4 years ago
  1. import Vue from 'vue'
  2. import App from '@/App'
  3. import router from '@/router' // api: https://github.com/vuejs/vue-router
  4. import store from '@/store' // api: https://github.com/vuejs/vuex
  5. import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie
  6. import '@/element-ui' // api: https://github.com/ElemeFE/element
  7. import '@/icons' // api: http://www.iconfont.cn/
  8. import '@/element-ui-theme'
  9. import '@/assets/scss/index.scss'
  10. import '@/assets/scss/message.scss'
  11. import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios
  12. import { isAuth } from '@/utils'
  13. import cloneDeep from 'lodash/cloneDeep'
  14. import JsonExcel from 'vue-json-excel'
  15. import i18n from '@/i18n/i18n'
  16. import './directives'
  17. import decimalUtil from '@/utils/decimalUtil'
  18. import dayjs from 'dayjs';
  19. import getLodop from '@/utils/LodopFuncs.js'
  20. import { debounce,throttle} from '@/utils/common.js'
  21. Vue.component('downloadExcel', JsonExcel)
  22. Vue.use(VueCookie)
  23. Vue.config.productionTip = false
  24. // 非生产环境, 适配mockjs模拟数据 // api: https://github.com/nuysoft/Mock
  25. if (process.env.NODE_ENV !== 'production') {
  26. require('@/mock')
  27. }
  28. // 挂载全局
  29. Vue.prototype.$http = httpRequest // ajax请求方法
  30. Vue.prototype.isAuth = isAuth // 权限方法
  31. Vue.prototype.decimalUtil = decimalUtil // 计算
  32. Vue.prototype.dayjs = dayjs //时间格式化插件 2021-11-02
  33. Vue.prototype.getLodop = getLodop // 打印
  34. Vue.prototype.debounce = debounce // 防抖
  35. Vue.prototype.throttle = throttle // 限流
  36. // 保存整站vuex本地储存初始状态
  37. window.SITE_CONFIG['storeState'] = cloneDeep(store.state)
  38. /* eslint-disable no-new */
  39. new Vue({
  40. el: '#app',
  41. router,
  42. i18n,
  43. store,
  44. template: '<App/>',
  45. components: { App }
  46. })