From 71f385f0f4fe51e65c23c36424f92e3693f8a0f8 Mon Sep 17 00:00:00 2001 From: lxy Date: Wed, 17 Dec 2025 16:37:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=86=E9=A1=B5=E7=BB=84=E4=BB=B6tota?= =?UTF-8?q?l=E4=B8=BAundefined=E6=97=B6=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/components/pagination/web.js | 4 ++-- src/components/pagination/web.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/es/components/pagination/web.js b/es/components/pagination/web.js index 71d8e08b..3244b833 100644 --- a/es/components/pagination/web.js +++ b/es/components/pagination/web.js @@ -19,7 +19,7 @@ MiddleSelect.Option = Select.Option; export default function Render(props) { const { style, className, oakPagination, oakFullpath, newTotal, showQuickJumper, showSizeChanger, size, showTotal, showTitle, } = props.data; const { t, setPageSize, setCurrentPage } = props.methods; - const { pageSize, total, currentPage, more, count, getTotal } = oakPagination || {}; + const { pageSize = 0, total = 0, currentPage = 1, more, count, getTotal } = oakPagination || {}; const paginationRef = useRef(null); const [internalInputVal, setInternalInputVal] = useState(currentPage); useEffect(() => { @@ -28,7 +28,7 @@ export default function Render(props) { if (!oakPagination) { return null; } - if (total === 0) { + if (!total) { return null; } const prefixCls = 'rc-pagination'; diff --git a/src/components/pagination/web.tsx b/src/components/pagination/web.tsx index df9f556c..881fbea6 100644 --- a/src/components/pagination/web.tsx +++ b/src/components/pagination/web.tsx @@ -60,7 +60,7 @@ export default function Render( showTitle, } = props.data; const { t, setPageSize, setCurrentPage } = props.methods; - const { pageSize, total, currentPage, more, count, getTotal } = oakPagination || {}; + const { pageSize = 0, total = 0, currentPage = 1, more, count, getTotal } = oakPagination || {}; const paginationRef = useRef(null); const [internalInputVal, setInternalInputVal] = useState(currentPage); @@ -71,7 +71,7 @@ export default function Render( if (!oakPagination) { return null; } - if (total === 0) { + if (!total) { return null }