From e96528870cda2c8cdadb416283bdf78ac5b29caf Mon Sep 17 00:00:00 2001 From: yj <1336058017@qq.com> Date: Thu, 10 Oct 2024 16:37:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=BA=E5=91=98=E5=88=86?= =?UTF-8?q?=E9=A1=B5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.tsx | 2 +- src/page/Home/User/index.tsx | 9 +++++---- src/utils/styles/App.scss | 5 ----- 3 files changed, 6 insertions(+), 10 deletions(-) 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;