diff --git a/src/@core/utils/dom.ts b/src/@core/utils/dom.ts
index ad5504ce..04f61ede 100644
--- a/src/@core/utils/dom.ts
+++ b/src/@core/utils/dom.ts
@@ -10,8 +10,7 @@ export function useDefer(maxFrameCount = 1) {
const refreshFrameCount = () => {
requestAnimationFrame(() => {
frameCount.value++
- if (frameCount.value < maxFrameCount)
- refreshFrameCount()
+ if (frameCount.value < maxFrameCount) refreshFrameCount()
})
}
refreshFrameCount()
@@ -19,3 +18,9 @@ export function useDefer(maxFrameCount = 1) {
return frameCount.value >= showInFrameCount
}
}
+
+export function ensureRenderComplete(callback: () => void) {
+ requestAnimationFrame(() => {
+ requestAnimationFrame(callback)
+ })
+}
diff --git a/src/App.vue b/src/App.vue
index db1233ee..383cb694 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,6 +1,7 @@
diff --git a/src/main.ts b/src/main.ts
index 20d973c6..301425e4 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -17,7 +17,6 @@ import { PerfectScrollbarPlugin } from 'vue3-perfect-scrollbar'
import { CronVuetify } from '@vue-js-cron/vuetify'
// 4. 工具函数和其他辅助模块
-import { removeEl } from './@core/utils/dom'
import { fetchGlobalSettings } from './api'
import { isPWA } from './@core/utils/navigator'
@@ -114,5 +113,4 @@ initializeApp().then(() => {
},
})
.mount('#app')
- .$nextTick(() => removeEl('#loading-bg'))
})