ludu-admin-vue3/src/hooks/web/usePageLoading.ts

19 lines
314 B
TypeScript

import { useAppStoreWithOut } from '@/store/modules/app'
const appStore = useAppStoreWithOut()
export const usePageLoading = () => {
const loadStart = () => {
appStore.setPageLoading(true)
}
const loadDone = () => {
appStore.setPageLoading(false)
}
return {
loadStart,
loadDone
}
}