This commit is contained in:
2026-02-04 11:27:45 +08:00
parent 1b17eb1dd2
commit b526c249e8
3 changed files with 7 additions and 3 deletions

View File

@@ -3,15 +3,18 @@ import { ref, computed } from 'vue'
export const useGlobalStore = defineStore('global', () => {
const state = ref({
loading: false,// 全局loading
view_loading: false,// 页面跳转loading
homeLeftNavCollapse: false,// 首页左侧导航是否折叠
})
const setLoading = (v: boolean) => { state.value.loading = v }
const setViewLoading = (v: boolean) => { state.value.view_loading = v }
const setHomeLeftNavCollapse = (v: boolean) => { state.value.homeLeftNavCollapse = v }
return {
state,
setLoading,
setViewLoading,
setHomeLeftNavCollapse,
}
})