diff --git a/src/hooks/common/table.ts b/src/hooks/common/table.ts index f4386c1..3e86d38 100644 --- a/src/hooks/common/table.ts +++ b/src/hooks/common/table.ts @@ -16,7 +16,9 @@ export function useTable(config: NaiveUI.NaiveTabl const isMobile = computed(() => appStore.isMobile); - const { apiFn, apiParams, immediate, showTotal } = config; + const { apiFn, apiParams, immediate } = config; + + const showTotal = config.showTotal || true; const SELECTION_KEY = '__selection__'; diff --git a/src/typings/naive-ui.d.ts b/src/typings/naive-ui.d.ts index 7074643..cfd38b6 100644 --- a/src/typings/naive-ui.d.ts +++ b/src/typings/naive-ui.d.ts @@ -47,7 +47,7 @@ declare namespace NaiveUI { /** * whether to display the total items count * - * @default false + * @default true */ showTotal?: boolean; };