import React from "react";
import { Pagination } from "antd";
import { LeftOutlined, RightOutlined } from "@ant-design/icons";
import Style from "./index.module.less";
export default function Render(props) {
const { style, className, oakPagination, oakFullpath, newTotal, showQuickJumper, showSizeChanger, size, showTotal, } = props.data;
const { t, setPageSize, setCurrentPage, setTotal } = props.methods;
const { pageSize, total, currentPage, more } = oakPagination || {};
const itemRender = (_, type, originalElement) => {
if (type === "prev") {
return (
);
}
if (type === "next") {
return ( {
if (more && currentPage) {
setTotal();
setCurrentPage(currentPage + 1);
}
}}>
);
}
return originalElement;
};
if (!oakPagination) {
return null;
}
return ( {
setPageSize(pageSize);
}} onChange={(page, pageSize) => {
setCurrentPage(page);
}}/>);
}