@cpany/app
Version:
CPany web app
18 lines (15 loc) • 328 B
text/typescript
import Progress from './progress.vue';
import { inject } from 'vue';
import type { Ref } from 'vue';
export { Progress };
export function useGlobalLoading() {
const loading = inject<Ref<boolean>>('loading');
return {
start() {
loading!.value = true;
},
end() {
loading!.value = false;
}
};
}