main.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import Vue from 'vue'
  2. import router from './router'
  3. import store from './store'
  4. import App from './App.vue'
  5. Vue.config.productionTip = false
  6. import {query} from "./utils/query.js"
  7. import design from 'ant-design-vue'
  8. import 'ant-design-vue/dist/antd.css'
  9. Vue.use(design)
  10. import ElementUI from 'element-ui'
  11. import 'element-ui/lib/theme-chalk/index.css'
  12. Vue.use(ElementUI)
  13. import VueQuillEditor from 'vue-quill-editor'
  14. import 'quill/dist/quill.core.css'
  15. import 'quill/dist/quill.snow.css'
  16. import 'quill/dist/quill.bubble.css'
  17. Vue.use(VueQuillEditor)
  18. import WdEditor from '@/components/Editor'
  19. Vue.use(WdEditor)
  20. import Rotation from '@/components/Rotation'
  21. Vue.use(Rotation)
  22. import PicLarge from '@/components/PicLarge'
  23. Vue.use(PicLarge)
  24. import Legend from '@/components/Legend'
  25. Vue.use(Legend)
  26. import cookies from 'vue-cookie'
  27. Vue.use(cookies)
  28. import Pui from 'meri-design'
  29. import 'meri-design/dist/index.css'
  30. import 'leaflet/dist/leaflet.css'
  31. Vue.use(Pui)
  32. //////////模拟传入参数
  33. const username = 'lengqiang'
  34. /////////////////
  35. // 在跳入路由之前要请求获取权限信息
  36. // console.log(store.state.isrequestAuth)
  37. // router.beforeEach(async (to, from, next) => {
  38. // if (!store.state.isrequestAuth) {
  39. // await store.dispatch('getUserInfo', username)
  40. // await store.dispatch('getFloors')
  41. // }
  42. // next()
  43. // })
  44. // 注册首屏加载
  45. /* import { IndexLoading } from 'meri-design'
  46. const indexLoading = IndexLoading();
  47. // 注册关闭方法,需要手动关闭
  48. Vue.prototype.$removeIndexLoading = () => {
  49. IndexLoading.remove(indexLoading)
  50. }
  51. document.addEventListener('readystatechange',()=>{
  52. if (document.readyState === 'complete') {
  53. IndexLoading.remove(indexLoading)
  54. }
  55. }) */
  56. new Vue({
  57. router,
  58. store,
  59. render: (h) => h(App),
  60. }).$mount('#app')