Bläddra i källkod

个人中心加入翻页

hanxin 2 år sedan
förälder
incheckning
594c5ae833
1 ändrade filer med 8 tillägg och 0 borttagningar
  1. 8 0
      src/pages/Profile/index.js

+ 8 - 0
src/pages/Profile/index.js

@@ -128,6 +128,12 @@ function profile(props) {
   const handleApproveSubmit = (values) => {
     console.log(values);
   };
+  const handleApplyPaginationChange = pagination => {
+    queryApplyListRequest.run({ currentPage: pagination.current, pageSize: pagination.pageSize })
+  }
+  const handleProfilePaginationChange = pagination => {
+    queryProfileListRequest.run({ currentPage: pagination.current, pageSize: pagination.pageSize })
+  }
   const renderPage = activeKey => {
     if (activeKey == '1')
       return <> <Form
@@ -162,6 +168,7 @@ function profile(props) {
           loading={queryApplyListRequest.loading}
           dataSource={queryApplyListRequest?.data?.list}
           pagination={queryApplyListRequest?.data?.pagination}
+          onChange={handleApplyPaginationChange}
         />
       </Form>
       </>
@@ -191,6 +198,7 @@ function profile(props) {
           columns={approveColumns}
           dataSource={queryProfileListRequest?.data?.list}
           pagination={queryProfileListRequest?.data?.pagination}
+          onChange={handleProfilePaginationChange}
         />
       </>
   }