Blame view

src/main.ts 1.59 KB
vben authored
1
import 'uno.css';
2
import '/@/design/index.less';
3
import '/@/components/VxeTable/src/css/index.scss';
4
import 'ant-design-vue/dist/antd.css';
5
6
// Register icon sprite
import 'virtual:svg-icons-register';
vben authored
7
import App from './App.vue';
Vben authored
8
import { createApp } from 'vue';
9
import { initAppConfigStore } from '/@/logics/initAppConfig';
10
import { setupErrorHandle } from '/@/logics/error-handle';
Vben authored
11
import { router, setupRouter } from '/@/router';
Vben authored
12
import { setupRouterGuard } from '/@/router/guard';
陈文彬 authored
13
import { setupStore } from '/@/store';
vben authored
14
import { setupGlobDirectives } from '/@/directives';
vben authored
15
16
import { setupI18n } from '/@/locales/setupI18n';
import { registerGlobComp } from '/@/components/registerGlobComp';
vben authored
17
vben authored
18
async function bootstrap() {
19
  const app = createApp(App);
Vben authored
20
21
  // Configure store
Jim authored
22
  // 配置 store
Vben authored
23
24
  setupStore(app);
25
  // Initialize internal system configuration
Jim authored
26
  // 初始化内部系统配置
27
28
  initAppConfigStore();
29
  // Register global components
Jim authored
30
  // 注册全局组件
31
  registerGlobComp(app);
vben authored
32
Vben authored
33
  // Multilingual configuration
Jim authored
34
  // 多语言配置
35
  // Asynchronous case: language files may be obtained from the server side
Jim authored
36
  // 异步案例:语言文件可能从服务器端获取
Vben authored
37
38
  await setupI18n(app);
39
  // Configure routing
Jim authored
40
  // 配置路由
41
  setupRouter(app);
vben authored
42
Vben authored
43
  // router-guard
Jim authored
44
  // 路由守卫
45
  setupRouterGuard(router);
vben authored
46
47
  // Register global directive
Jim authored
48
  // 注册全局指令
49
  setupGlobDirectives(app);
陈文彬 authored
50
51
  // Configure global error handling
Jim authored
52
  // 配置全局错误处理
53
  setupErrorHandle(app);
陈文彬 authored
54
Vben authored
55
  // https://next.router.vuejs.org/api/#isready
56
  // await router.isReady();
vben authored
57
vben authored
58
  app.mount('#app');
vben authored
59
60
}
vben authored
61
bootstrap();