Commit 89d4c5b0 authored by wangchunxiang's avatar wangchunxiang

fix:页码bug

parent 72ec66de
Pipeline #2117 passed with stage
in 0 seconds
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,5 +8,5 @@ ...@@ -8,5 +8,5 @@
<link rel="shortcut icon" href="./favicon.png"><link href="./css\1.css" rel="stylesheet"><link href="./css\index.css" rel="stylesheet"></head> <link rel="shortcut icon" href="./favicon.png"><link href="./css\1.css" rel="stylesheet"><link href="./css\index.css" rel="stylesheet"></head>
<body> <body>
<div id="ice-container"></div> <div id="ice-container"></div>
<script type="text/javascript" src="./vendors~index.492db4ef39b5fbb503d6.js"></script><script type="text/javascript" src="./index.1f3e035c01bd61f6a8f3.js"></script></body> <script type="text/javascript" src="./vendors~index.492db4ef39b5fbb503d6.js"></script><script type="text/javascript" src="./index.15f67d8db5563d2dfd41.js"></script></body>
</html> </html>
...@@ -10,9 +10,9 @@ export default class ItemTable extends Component{ ...@@ -10,9 +10,9 @@ export default class ItemTable extends Component{
{ {
(()=>{ (()=>{
if(this.props.scroll){ if(this.props.scroll){
return <Table rowKey='id' bordered scroll={this.props.scroll} onChange={this.props.onChange || null} columns={this.props.columns} dataSource={this.props.dataSource.data} pagination={{onChange: this.props.pager,pageSize:this.props.dataSource.pageSize,current:this.props.dataSource.page,total:this.props.dataSource.totalNum}} rowSelection={this.props.rowSelection}/> return <Table rowKey='id' bordered scroll={this.props.scroll} onChange={this.props.onChange || null} columns={this.props.columns} dataSource={this.props.dataSource.data} pagination={{onChange: this.props.pager,total:this.props.dataSource.totalNum}} rowSelection={this.props.rowSelection}/>
}else { }else {
return <Table rowKey='id' bordered onChange={this.props.onChange || null} columns={this.props.columns} dataSource={this.props.dataSource.data} pagination={{onChange: this.props.pager,pageSize:this.props.dataSource.pageSize,current:this.props.dataSource.page,total:this.props.dataSource.totalNum}} rowSelection={this.props.rowSelection}/> return <Table rowKey='id' bordered onChange={this.props.onChange || null} columns={this.props.columns} dataSource={this.props.dataSource.data} pagination={{onChange: this.props.pager,total:this.props.dataSource.totalNum}} rowSelection={this.props.rowSelection}/>
} }
})() })()
} }
......
...@@ -130,7 +130,11 @@ const { TextArea } = Input; ...@@ -130,7 +130,11 @@ const { TextArea } = Input;
} }
render() { render() {
const {platData,channelData,currencyData}=this.state; const {platData,channelData,currencyData,dataSource}=this.state;
dataSource.data&&dataSource.data.map((item,index)=>{
item.id=index
});
console.log(dataSource)
const itemTableQuery= [ const itemTableQuery= [
{ {
...@@ -200,7 +204,7 @@ const { TextArea } = Input; ...@@ -200,7 +204,7 @@ const { TextArea } = Input;
</div> </div>
<ItemTable columns={this.columns} dataSource={this.state.dataSource} pager={this.pager} /> <ItemTable columns={this.columns} dataSource={dataSource} pager={this.pager} />
</section> </section>
</Fragment> </Fragment>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment