044042fe7e
- 新增 AppLoader 组件作为全局加载器 - 引入 Pinia 状态管理应用加载状态 - 创建 usePageScrollLock 组合式函数管理滚动锁定 - 重构首页动画流程,使用 Promise 链式调用 - 移除旧的 HomeLoader 组件 - 优化头部导航栏的入场动画触发逻辑
16 lines
292 B
TypeScript
16 lines
292 B
TypeScript
import { defineStore } from 'pinia'
|
|
import { ref } from 'vue'
|
|
|
|
export const useAppStore = defineStore('app', () => {
|
|
const isAppLoading = ref(true)
|
|
|
|
const setAppLoading = (loading: boolean) => {
|
|
isAppLoading.value = loading
|
|
}
|
|
|
|
return {
|
|
isAppLoading,
|
|
setAppLoading,
|
|
}
|
|
})
|