From 2af71bcf522c485ea005184c977986374a7dcc4a Mon Sep 17 00:00:00 2001
From: Sanakey <714737083@qq.com>
Date: 星期六, 28 九月 2024 09:47:10 +0800
Subject: [PATCH] Merge branch 'feng-v1-editor' of http://192.168.100.20:9090/r/onbus_crm into li-v1

---
 src/main.ts |   73 +++++++++++++++++++++---------------
 1 files changed, 43 insertions(+), 30 deletions(-)

diff --git a/src/main.ts b/src/main.ts
index d43ffb5..c6d9183 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,59 +1,72 @@
-import '/@/design/index.less';
-import '@virtual/windi.css';
+import 'uno.css';
+import '@/design/index.less';
+import '@/components/VxeTable/src/css/index.scss';
+import 'ant-design-vue/dist/reset.css';
+// Register icon sprite
+import 'virtual:svg-icons-register';
 
 import { createApp } from 'vue';
+
+import { registerGlobComp } from '@/components/registerGlobComp';
+import { setupGlobDirectives } from '@/directives';
+import { setupI18n } from '@/locales/setupI18n';
+import { setupErrorHandle } from '@/logics/error-handle';
+import { initAppConfigStore } from '@/logics/initAppConfig';
+import { router, setupRouter } from '@/router';
+import { setupRouterGuard } from '@/router/guard';
+import { setupStore } from '@/store';
+import VueCookies from 'vue-cookies'
+import Antd from 'ant-design-vue';
+
 import App from './App.vue';
 
-import router, { setupRouter } from '/@/router';
-import { setupRouterGuard } from '/@/router/guard';
-import { setupStore } from '/@/store';
-import { setupErrorHandle } from '/@/logics/error-handle';
-import { setupGlobDirectives } from '/@/directives';
-import { setupI18n } from '/@/locales/setupI18n';
-import { registerGlobComp } from '/@/components/registerGlobComp';
 
-// Register icon Sprite
-import 'vite-plugin-svg-icons/register';
+import Logger from '@/utils/logger';
 
-// Do not introduce` on-demand in local development?
-// In the local development for on-demand introduction, the number of browser requests will increase by about 20%.
-// Which may slow down the browser refresh.
-// Therefore, all are introduced in local development, and only introduced on demand in the production environment
-if (import.meta.env.DEV) {
-  import('ant-design-vue/dist/antd.less');
-}
-
-(async () => {
+// 灏� Logger 娣诲姞鍒� window 瀵硅薄涓�
+window.Logger = Logger;
+async function bootstrap() {
   const app = createApp(App);
-
-  // Configure vuex store
+  app.use(Antd)
+  app.use(VueCookies);
+  // Configure store
+  // 閰嶇疆 store
   setupStore(app);
 
+  // Initialize internal system configuration
+  // 鍒濆鍖栧唴閮ㄧ郴缁熼厤缃�
+  initAppConfigStore();
+
   // Register global components
+  // 娉ㄥ唽鍏ㄥ眬缁勪欢
   registerGlobComp(app);
 
   // Multilingual configuration
+  // 澶氳瑷�閰嶇疆
+  // Asynchronous case: language files may be obtained from the server side
+  // 寮傛妗堜緥锛氳瑷�鏂囦欢鍙兘浠庢湇鍔″櫒绔幏鍙�
   await setupI18n(app);
 
   // Configure routing
+  // 閰嶇疆璺敱
   setupRouter(app);
 
   // router-guard
-  setupRouterGuard();
+  // 璺敱瀹堝崼
+  setupRouterGuard(router);
 
   // Register global directive
+  // 娉ㄥ唽鍏ㄥ眬鎸囦护
   setupGlobDirectives(app);
 
   // Configure global error handling
+  // 閰嶇疆鍏ㄥ眬閿欒澶勭悊
   setupErrorHandle(app);
 
-  // Mount when the route is ready
   // https://next.router.vuejs.org/api/#isready
-  await router.isReady();
+  // await router.isReady();
 
-  app.mount('#app', true);
+  app.mount('#app');
+}
 
-  if (import.meta.env.DEV) {
-    window.__APP__ = app;
-  }
-})();
+bootstrap();

--
Gitblit v1.8.0