mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-08 01:00:36 +08:00
feat: 添加确保渲染完成的函数并优化加载背景移除逻辑
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user