antd表格排序
Posted hamili
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了antd表格排序相关的知识,希望对你有一定的参考价值。
import { DndProvider } from ‘react-dnd‘;
import { html5Backend } from ‘react-dnd-html5-backend‘;
<DndProvider backend={HTML5Backend}>
<Table
columns={columns}
locale={{ emptyText: ‘empty‘ }}
components={this.components}
dataSource={[]}
pagination={false}
onRow={(record, index) => ({
index,
record,
onMouseDown: this.mouseDownRow.bind(this, record),
moveRow: this.moveRow.bind(this, record),
})}
/>
</DndProvider>
moveRow = (record, dragKey, hoverKey) => {}
mouseDownRow = (record) => {
this.dragRow = record;
}
以上是关于antd表格排序的主要内容,如果未能解决你的问题,请参考以下文章