diff --git a/src/main.tsx b/src/main.tsx index 2931b2a..9d1d257 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,7 +3,7 @@ import App from './App.tsx' import '@/utils/styles/main.css' import { HashRouter } from 'react-router-dom'; import { ConfigProvider } from 'antd'; -import zhCN from 'antd/locale/zh_CN'; +import zhCN from 'antd/es/locale/zh_CN'; import 'animate.css'; ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/src/page/Home/User/index.tsx b/src/page/Home/User/index.tsx index 81e3bca..ffc774d 100644 --- a/src/page/Home/User/index.tsx +++ b/src/page/Home/User/index.tsx @@ -42,7 +42,7 @@ const User: React.FC = () => { useEffect(() => { getUserList() - }, [list.pageIndex]); + }, [list.pageIndex, list.pageSize]); const getUserList = async (): Promise => { await GetUserList({ @@ -258,12 +258,13 @@ const User: React.FC = () => {
共{list.total}项数据 - { + { setList({ ...list, - pageIndex: e + pageIndex: page, + pageSize: pageSize }) - }} pageSize={list.pageSize} current={list.pageIndex} hideOnSinglePage={true} /> + }} showSizeChanger pageSize={list.pageSize} current={list.pageIndex} />
diff --git a/src/utils/styles/App.scss b/src/utils/styles/App.scss index eeef848..3b5551f 100644 --- a/src/utils/styles/App.scss +++ b/src/utils/styles/App.scss @@ -189,8 +189,6 @@ $pagination-hover-background-color: #5575F2; .ant-pagination-prev, .ant-pagination-next { - width: 30px !important; - height: 30px !important; border-radius: 50%; background: $pagination-background-color; @@ -200,9 +198,6 @@ $pagination-hover-background-color: #5575F2; } .ant-pagination-item { - width: 30px !important; - height: 30px !important; - line-height: 30px !important; border-radius: 50%; background: $pagination-background-color !important; margin-right: 10px !important;