main.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // 兼容 IE
  2. // https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
  3. //import 'core-js/stable'
  4. //import 'regenerator-runtime/runtime'
  5. require('@/assets/css/index.scss')
  6. import Vue from 'vue'
  7. import App from './App.vue'
  8. import Vant from 'vant'
  9. import 'vant/lib/index.css'
  10. import router from './router'
  11. import store from './store'
  12. // 引入样式
  13. import 'vue-easytable/libs/theme-default/index.css'
  14. // 引入组件库
  15. import VueEasytable from 'vue-easytable'
  16. import dayjs from 'dayjs'
  17. import { imgUrl } from '@/utils'
  18. // 设置 js中可以访问 $cdn
  19. import config, { $cdn } from '@/config'
  20. import EmptyBox from '@/components/EmptyBox'
  21. Vue.prototype.$cdn = $cdn
  22. Vue.prototype.dayjs = dayjs
  23. Vue.prototype.imgUrl = imgUrl
  24. // 移动端适配
  25. import 'amfe-flexible'
  26. // filters
  27. import './filters'
  28. Vue.config.productionTip = false
  29. import VCalendar from 'v-calendar'
  30. import globals from '@/utils/global.js' //全局混入
  31. import '@vant/touch-emulator'
  32. import './components/index.js'
  33. import watercom from '@/components/waterCom.vue'
  34. Vue.component('watercom', watercom)
  35. Vue.use(Vant)
  36. // Vue.use(watercom);
  37. Vue.use(VueEasytable)
  38. Vue.use(globals)
  39. Vue.use(VCalendar, {
  40. componentPrefix: 'vc' // Use <vc-calendar /> instead of <v-calendar />
  41. })
  42. new Vue({
  43. el: '#app',
  44. router,
  45. store,
  46. render: h => h(App)
  47. })