鍍金池/ 問答/PHP  HTML/ ant-design Table組件怎么能選到想要的哪個值?

ant-design Table組件怎么能選到想要的哪個值?

clipboard.png
比如我想復(fù)制一條數(shù)據(jù)中的所有信息,我需要怎么做?
是通過key還是什么 就是選不到想選中的這條信息

回答
編輯回答
司令

colums 有個render參數(shù) 接受一個function 參數(shù)是text(dataIndex對應(yīng)的數(shù)據(jù)) record(這一行數(shù)據(jù))

2017年8月20日 16:25
編輯回答
維他命
columns = [
{
    title: '操作',
    reader: (text, record) => {
        return(
            <div>
                <Button onClick={() => {
                    //record 就是這一行的記錄
                    console.log(record);
                }}>復(fù)制</Button>
            </div>
        );
    }
}
]
2017年10月6日 13:16