usePageLoading.ts 314 B

123456789101112131415161718
  1. import { useAppStoreWithOut } from '@/store/modules/app'
  2. const appStore = useAppStoreWithOut()
  3. export const usePageLoading = () => {
  4. const loadStart = () => {
  5. appStore.setPageLoading(true)
  6. }
  7. const loadDone = () => {
  8. appStore.setPageLoading(false)
  9. }
  10. return {
  11. loadStart,
  12. loadDone
  13. }
  14. }