main.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import 'core-js'
  2. import 'regenerator-runtime/runtime'
  3. import { createApp } from 'vue'
  4. import App from './App.vue'
  5. import router from './router'
  6. import directives from '@/directives' // 自定义指令集
  7. //import 'default-passive-events'
  8. import '@/utils/h5plus' // 加载html5+
  9. import 'hqchart/src/jscommon/umychart.resource/font/iconfont.css'
  10. import layouts from '@mobile/components/layouts' // 全局布局组件
  11. import 'vant/lib/index.css'
  12. import VXETable from 'vxe-table'
  13. import 'vxe-table/lib/style.css'
  14. import './assets/themes/style.less' // 主题样式
  15. // import { timerInterceptor } from '@/utils/timer'
  16. // import { useGlobalStore } from '@/stores'
  17. // import Vconsole from 'vconsole'
  18. // new Vconsole()
  19. const app = createApp(App)
  20. app.use(router)
  21. app.use(directives)
  22. app.use(VXETable)
  23. app.use(layouts)
  24. app.mount('#app')
  25. // 等待 html 加载完成
  26. // document.addEventListener('DOMContentLoaded', () => {
  27. // const { screenAdapter } = useGlobalStore()
  28. // // 适配客户端
  29. // screenAdapter(true)
  30. // // 监听窗口大小变化
  31. // window.addEventListener('resize', timerInterceptor.setDebounce(() => screenAdapter(true)))
  32. // }, false)