编辑按钮的呈现中的data
和row
变量是什么。我目前不明白。
{
sort: false,
title: '',
name: 'btnEdit',
render: (data: any, row: User): string => {
return "<div class='text-center'>" +
"<button type='button' class='btn btn-sm btn-primary'><span class='glyphicon glyphicon-pencil'></span></button>" +
"</div>";
},
action: (data: any, row: User): any => {
alert("Id: " + row.id);
}
},