import 'core-js' import 'regenerator-runtime/runtime' import { createApp } from 'vue' import App from './App.vue' import router from './router' import directives from '@/directives' // 自定义指令集 //import 'default-passive-events' import '@/utils/h5plus' // 加载html5+ import 'hqchart/src/jscommon/umychart.resource/font/iconfont.css' import layouts from './components/layouts' // 全局布局组件 import 'vant/lib/index.css' import './assets/themes/style.less' // 主题样式 import { timerInterceptor } from '@/utils/timer' import { useGlobalStore } from '@/stores' // import Vconsole from 'vconsole' // new Vconsole() const app = createApp(App) app.use(router) app.use(directives) app.use(layouts) app.mount('#app') // 等待 html 加载完成 document.addEventListener('DOMContentLoaded', () => { const { screenAdapter } = useGlobalStore() // 适配客户端 screenAdapter(true) // 监听窗口大小变化 window.addEventListener('resize', timerInterceptor.setDebounce(() => screenAdapter(true))) }, false)