fix(App.vue): 优化页面加载时的背景移除逻辑,增加延迟以确保渲染完成

This commit is contained in:
jxxghp
2025-01-26 08:48:22 +08:00
parent f49cafc0cc
commit f836d175f0

View File

@@ -42,15 +42,15 @@ if (window.Apex) {
}
}
// 页面加载时,加载当前用户数据
onBeforeMount(async () => {
setTheme()
})
onMounted(() => {
setTheme()
ensureRenderComplete(() => {
nextTick(() => removeEl('#loading-bg'))
});
nextTick(() => {
setTimeout(() => {
removeEl('#loading-bg')
}, 1000)
})
})
})
</script>