From 69c4995b52e86d2a6ba57519e4deb0e8f71f21c3 Mon Sep 17 00:00:00 2001 From: nullcache <99305540+nullcache@users.noreply.github.com> Date: Tue, 27 Jun 2023 11:54:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DuseTable=E5=9C=A8total?= =?UTF-8?q?=E4=B8=BA0=E6=97=B6=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/useTable.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hooks/web/useTable.ts b/src/hooks/web/useTable.ts index 3f0d5055..361dd678 100644 --- a/src/hooks/web/useTable.ts +++ b/src/hooks/web/useTable.ts @@ -136,9 +136,7 @@ export const useTable = (config?: UseTableConfig) => { }) if (res) { tableObject.tableList = (res as unknown as ResponseType).list - if ((res as unknown as ResponseType).total) { - tableObject.total = (res as unknown as ResponseType).total as unknown as number - } + tableObject.total = (res as unknown as ResponseType).total ?? 0 } }, setProps: async (props: TableProps = {}) => {