mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-24 12:26:38 +08:00
12 lines
266 B
TypeScript
12 lines
266 B
TypeScript
import useBoolean from './useBoolean';
|
|
|
|
export default function useLoading(initValue: boolean = false) {
|
|
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initValue);
|
|
|
|
return {
|
|
loading,
|
|
startLoading,
|
|
endLoading
|
|
};
|
|
}
|