<Table onRow={record => {
return {
onClick:()=> getRow(record), // 点击行
};
}} dataSource={tablesource} columns={columns} />
record为行内容,直接log一堆,要转为对象
function getRow(record) {
console.log(JSON.stringify(record))
}
<Table onRow={record => {
return {
onClick:()=> getRow(record), // 点击行
};
}} dataSource={tablesource} columns={columns} />
record为行内容,直接log一堆,要转为对象
function getRow(record) {
console.log(JSON.stringify(record))
}