实现效果如下:
代码实现:
rowKey一定
<Table
rowSelection={rowSelection}
rowKey='id'
onRow={this.onRow}
rowClassName={this.setClassName}
columns={columns}
dataSource={data} />
// 鼠标移入每一行的事件
onRow = (row, index) => {
return {
onMouseEnter: event => {
const { dispatch } = this.props;
dispatch ({
type: 'projectManage/upState',
payload: {
hoverIndex: index
},
});
},
onMouseLeave: event => {
const { dispatch } = this.props;
dispatch ({
type: 'projectMana