From b654b5d780cc882b811cd8e3e4877cbc84e60659 Mon Sep 17 00:00:00 2001 From: xlsea Date: Thu, 25 Jul 2024 16:28:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor(sj=5F1.2.0-beta1):=20=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA=E6=80=BB=E6=9D=A1?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/common/table.ts | 4 +++- src/typings/naive-ui.d.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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; };