CzRger hai 2 meses
pai
achega
89098d16b8
Modificáronse 3 ficheiros con 2 adicións e 11 borrados
  1. 1 2
      src/main.ts
  2. 1 1
      src/plugins/initProperties.ts
  3. 0 8
      src/router/index.ts

+ 1 - 2
src/main.ts

@@ -19,9 +19,8 @@ import './style/tailwind.css'
 const app = createApp(App)
 app.use(initDirectives)
 app.use(createPinia())
-await initProperties(app)
+initProperties(app)
 initComponent(app)
-// await beforeInit()
 app.use(router)
 app.use(ElementPlus)
 app.use(Antd)

+ 1 - 1
src/plugins/initProperties.ts

@@ -1,6 +1,6 @@
 import { App, nextTick, reactive } from 'vue'
 import * as czrUtil from '@/utils/czr-util'
 
-export default async (app: App) => {
+export default (app: App) => {
   app.config.globalProperties.$czrUtil = czrUtil
 }

+ 0 - 8
src/router/index.ts

@@ -75,12 +75,4 @@ router.beforeEach((to, from, next) => {
     initUser(next)
   }
 })
-// export const beforeInit = () => {
-//   const l = document.getElementById('loader')
-//   if (!hasLogin) {
-//     if (l) {
-//       l.style.display = 'none'
-//     }
-//   }
-// }
 export default router