feat: 添加确保渲染完成的函数并优化加载背景移除逻辑

This commit is contained in:
jxxghp
2025-01-26 08:42:09 +08:00
parent a3ecad3436
commit f49cafc0cc
3 changed files with 14 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
<script lang="ts" setup>
import { useTheme } from 'vuetify'
import { checkPrefersColorSchemeIsDark } from '@/@core/utils'
import { ensureRenderComplete, removeEl } from './@core/utils/dom'
const { global: globalTheme } = useTheme()
@@ -45,6 +46,12 @@ if (window.Apex) {
onBeforeMount(async () => {
setTheme()
})
onMounted(() => {
ensureRenderComplete(() => {
nextTick(() => removeEl('#loading-bg'))
});
})
</script>
<template>