增加排序参数
This commit is contained in:
@ -259,6 +259,16 @@ class UserGroup extends Component {
|
||||
})
|
||||
}
|
||||
|
||||
handleTableChange = (pagination, filters, sorter) => {
|
||||
let query = {
|
||||
...this.state.queryParams,
|
||||
'order': sorter.order,
|
||||
'field': sorter.field
|
||||
}
|
||||
|
||||
this.loadTableData(query);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
const columns = [{
|
||||
@ -271,6 +281,7 @@ class UserGroup extends Component {
|
||||
}, {
|
||||
title: '名称',
|
||||
dataIndex: 'name',
|
||||
sorter: true,
|
||||
}, {
|
||||
title: '授权资产',
|
||||
dataIndex: 'assetCount',
|
||||
@ -293,7 +304,8 @@ class UserGroup extends Component {
|
||||
{dayjs(text).fromNow()}
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
},
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -422,6 +434,7 @@ class UserGroup extends Component {
|
||||
showTotal: total => `总计 ${total} 条`
|
||||
}}
|
||||
loading={this.state.loading}
|
||||
onChange={this.handleTableChange}
|
||||
/>
|
||||
|
||||
{/* 为了屏蔽ant modal 关闭后数据仍然遗留的问题*/}
|
||||
|
Reference in New Issue
Block a user