diff --git a/src/hooks/index.ts b/src/hooks/index.ts index e78b4c1..c42edf9 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -1,4 +1,3 @@ export * from './useBoolean' -export * from './useLoading' export * from './useEcharts' export * from './usePermission' diff --git a/src/hooks/useLoading.ts b/src/hooks/useLoading.ts deleted file mode 100644 index 72a6f7b..0000000 --- a/src/hooks/useLoading.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { useBoolean } from './useBoolean' - -export function useLoading(initValue = false) { - const { - bool: loading, - setTrue: startLoading, - setFalse: endLoading, - } = useBoolean(initValue) - - return { - loading, - startLoading, - endLoading, - } -} diff --git a/src/views/list/commonList/index.vue b/src/views/list/commonList/index.vue index c98e2a3..e15457a 100644 --- a/src/views/list/commonList/index.vue +++ b/src/views/list/commonList/index.vue @@ -3,10 +3,10 @@ import type { DataTableColumns, FormInst } from 'naive-ui' import { NButton, NPopconfirm, NSpace, NSwitch, NTag } from 'naive-ui' import TableModal from './components/TableModal.vue' import { fetchUserList } from '@/service' -import { useBoolean, useLoading } from '@/hooks' +import { useBoolean } from '@/hooks' import { Gender } from '@/constants' -const { loading, startLoading, endLoading } = useLoading(false) +const { bool: loading, setTrue: startLoading, setFalse: endLoading } = useBoolean(false) const { bool: visible, setTrue: openModal } = useBoolean(false) const initialModel = { diff --git a/src/views/setting/account/components/TableModal.vue b/src/views/setting/account/components/TableModal.vue index 0599823..be1c442 100644 --- a/src/views/setting/account/components/TableModal.vue +++ b/src/views/setting/account/components/TableModal.vue @@ -1,5 +1,5 @@