github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/static_source/admin/src/hooks/web/usePageLoading.ts (about) 1 import { useAppStoreWithOut } from '@/store/modules/app' 2 3 const appStore = useAppStoreWithOut() 4 5 export const usePageLoading = () => { 6 const loadStart = () => { 7 appStore.setPageLoading(true) 8 } 9 10 const loadDone = () => { 11 appStore.setPageLoading(false) 12 } 13 14 return { 15 loadStart, 16 loadDone 17 } 18 }