mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-28 03:39:46 +08:00
fix(App.vue): 优化页面加载时的背景移除逻辑,增加延迟以确保渲染完成
This commit is contained in:
14
src/App.vue
14
src/App.vue
@@ -42,15 +42,15 @@ if (window.Apex) {
|
||||
}
|
||||
}
|
||||
|
||||
// 页面加载时,加载当前用户数据
|
||||
onBeforeMount(async () => {
|
||||
setTheme()
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
setTheme()
|
||||
ensureRenderComplete(() => {
|
||||
nextTick(() => removeEl('#loading-bg'))
|
||||
});
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
removeEl('#loading-bg')
|
||||
}, 1000)
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user