该如何把一行数据的id
放到@row-click
里面当作参数传递呢?
export default { data () { return { tableData: [ { id: '1', wName: 'xxx公众号1', wID: 'zjfiawsf', seller: 'xxxxx公司xxxxx公司xxxxx公司', sign: '已签约', amount_1: '14614.00', amount_2: '0.00', amount_3: '322.00', amount_4: '32122.00', date: '2019-08-09', status: '未冻结' }, { id: '2', wName: 'xxx公众号2', wID: 'zjfiawsf', seller: 'xxxxx公司xxxxx公司xxxxx公司', sign: '已签约', amount_1: '14614.00', amount_2: '0.00', amount_3: '322.00', amount_4: '32122.00', date: '2019-08-09', status: '未冻结' } ] } }, methods: { //打开详情页弹窗 openDetails(id) { console.log(id) }, }}
// 文档中有:row-click 当某一行被点击时会触发该事件 三个参数:row, event, columnmethods: { //打开详情页弹窗 openDetails(row) { console.log(row.id); },}
row-click
返回了三个参数 row
, event
, column
row-click 当某一行被点击时会触发该事件 row, event, column