mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-23 01:09:50 +08:00
优化加载动画逻辑
This commit is contained in:
10
src/App.vue
10
src/App.vue
@@ -123,14 +123,8 @@ function startBackgroundRotation() {
|
||||
function animateAndRemoveLoader() {
|
||||
const loadingBg = document.querySelector('#loading-bg') as HTMLElement
|
||||
if (loadingBg) {
|
||||
// 先添加完成动画类
|
||||
loadingBg.classList.add('loading-complete')
|
||||
// 等待动画完成后再移除元素
|
||||
setTimeout(() => {
|
||||
removeEl('#loading-bg')
|
||||
// 将background属性从html的style中移除
|
||||
document.documentElement.style.removeProperty('background')
|
||||
}, 500)
|
||||
removeEl('#loading-bg')
|
||||
document.documentElement.style.removeProperty('background')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ export const useGlobalSettingsStore = defineStore('globalSettings', {
|
||||
isInitialized: state => state.initialized,
|
||||
isLoading: state => state.loading,
|
||||
getData: state => state.data,
|
||||
// 直接返回data对象,避免使用.value
|
||||
globalSettings: state => state.data,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user