소스 검색

分页问题

魏超 5 년 전
부모
커밋
fb3aabaf28
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      src/pages/customer/customerlist/components/attribution.jsx

+ 2
- 1
src/pages/customer/customerlist/components/attribution.jsx 파일 보기

@@ -56,6 +56,7 @@ class ModalAttribution extends React.Component {
56 56
     }
57 57
     // 网路请求
58 58
     request({ ...apis.customer.buildingConsultant, params: { ...params } }).then(res => {
59
+      console.log('res',res);
59 60
       this.setState({ dataSource: res })
60 61
     }).catch(err => {
61 62
       // eslint-disable-next-line no-unused-expressions
@@ -135,7 +136,7 @@ class ModalAttribution extends React.Component {
135 136
             // onOk={() => this.handleOk()}
136 137
             onCancel={(e) => this.handleCancel(e)}
137 138
           >
138
-            <Table rowKey="attribution" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, onChange: e => this.onChange(e) }} />
139
+            <Table rowKey="attribution" dataSource={this.state.dataSource.records} columns={columns} pagination={{ total: this.state.dataSource.total, pageSize: this.state.dataSource.size, onChange: e => this.onChange(e) }} />
139 140
           </Modal>
140 141
       </>
141 142
     );