mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-24 13:30:19 +08:00
15 lines
378 B
TypeScript
15 lines
378 B
TypeScript
import useBoolean from './useBoolean';
|
|
|
|
export default function useLoadingEmpty(initLoading = false, initEmpty = false) {
|
|
const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(initLoading);
|
|
const { bool: empty, setBool: setEmpty } = useBoolean(initEmpty);
|
|
|
|
return {
|
|
loading,
|
|
startLoading,
|
|
endLoading,
|
|
empty,
|
|
setEmpty
|
|
};
|
|
}
|