还原示例

This commit is contained in:
wanghaoo 2019-02-19 09:34:38 +08:00
parent ae5663630f
commit 2ef7e05d90
4 changed files with 16 additions and 44 deletions

View File

@ -62,7 +62,7 @@ const columns = [
}
];
const data = [ ...new Array(20) ].map((e, i) => {
const data = [ ...new Array(10000) ].map((e, i) => {
const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };
if(i%3==0){
rs.b = '女';
@ -80,18 +80,9 @@ class Demo30 extends Component {
selectedRowIndex: 0
}
}
add=()=>{
let {data} = this.state;
const len =data.length;
data.push({a: len + 'a', b: len+ 'b', c: len + 'c', d: len + 'd', key: len });
this.setState({
data
});
}
render() {
return (
<div>
<button onClick={this.add}>new</button>
<BigDataTable
columns={columns}
data={data}
@ -101,7 +92,7 @@ class Demo30 extends Component {
console.log('currentIndex--'+index);
}}
/>
</div>
);
}

File diff suppressed because one or more lines are too long

41
dist/demo.js vendored

File diff suppressed because one or more lines are too long

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long