mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 01:29:11 +08:00
Merge branch 'master' of github.com:ant-design/ant-design
This commit is contained in:
commit
37e053aa37
@ -19,20 +19,17 @@ import reqwest from 'reqwest';
|
|||||||
const columns = [{
|
const columns = [{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
filters: [{
|
filters: [
|
||||||
text: '姓李的',
|
{ text: '姓李的', value: '李' },
|
||||||
value: '李'
|
{ text: '姓胡的', value: '胡' },
|
||||||
}, {
|
],
|
||||||
text: '姓胡的',
|
|
||||||
value: '胡'
|
|
||||||
}]
|
|
||||||
}, {
|
}, {
|
||||||
title: '年龄',
|
title: '年龄',
|
||||||
dataIndex: 'age',
|
dataIndex: 'age',
|
||||||
sorter: true
|
sorter: true,
|
||||||
}, {
|
}, {
|
||||||
title: '住址',
|
title: '住址',
|
||||||
dataIndex: 'address'
|
dataIndex: 'address',
|
||||||
}];
|
}];
|
||||||
|
|
||||||
const Test = React.createClass({
|
const Test = React.createClass({
|
||||||
@ -47,20 +44,15 @@ const Test = React.createClass({
|
|||||||
const pager = this.state.pagination;
|
const pager = this.state.pagination;
|
||||||
pager.current = pagination.current;
|
pager.current = pagination.current;
|
||||||
this.setState({
|
this.setState({
|
||||||
pagination: pager
|
pagination: pager,
|
||||||
});
|
});
|
||||||
const params = {
|
this.fetch({
|
||||||
pageSize: pagination.pageSize,
|
pageSize: pagination.pageSize,
|
||||||
currentPage: pagination.current,
|
currentPage: pagination.current,
|
||||||
sortField: sorter.field,
|
sortField: sorter.field,
|
||||||
sortOrder: sorter.order
|
sortOrder: sorter.order,
|
||||||
};
|
...filters,
|
||||||
for (let key in filters) {
|
});
|
||||||
if (filters.hasOwnProperty(key)) {
|
|
||||||
params[key] = filters[key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.fetch(params);
|
|
||||||
},
|
},
|
||||||
fetch(params = {}) {
|
fetch(params = {}) {
|
||||||
console.log('请求参数:', params);
|
console.log('请求参数:', params);
|
||||||
|
@ -161,7 +161,7 @@ class Transfer extends Component {
|
|||||||
|
|
||||||
const cls = classNames({
|
const cls = classNames({
|
||||||
[className]: !!className,
|
[className]: !!className,
|
||||||
prefixCls: true,
|
[prefixCls]: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user