其他分享
首页 > 其他分享> > antd表格排序

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; }  

标签:dnd,mouseDownRow,表格,moveRow,bind,react,record,antd,排序
来源: https://www.cnblogs.com/hamili/p/13253302.html