Merge branch 'dev' of gitea.51mars.com:Oak-Team/oak-frontend-base into dev

This commit is contained in:
Xu Chang 2025-12-26 11:02:29 +08:00
commit 51cc8786a0
2 changed files with 4 additions and 4 deletions

View File

@ -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';

View File

@ -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<HTMLUListElement>(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
}