19 lines
314 B
TypeScript
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
|
||
|
}
|
||
|
}
|