From 073679875b9c05b07573e0c0e5f2cbd960140c73 Mon Sep 17 00:00:00 2001 From: nullcache <13013389+nullcache@user.noreply.gitee.com> Date: Tue, 27 Jun 2023 04:06:01 +0000 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 = {}) => {