共计 685 个字符,预计需要花费 2 分钟才能阅读完成。
@cell-click 点击事件
<el-table :data="records" style="width: 100%" @cell-click="txidUrl">
<el-table-column prop="burnTime" label="工夫" width="180"></el-table-column>
<el-table-column prop="txid" :formatter="(row,column,cellValue,index) => {return ellipseText(cellValue);}" label="交易 ID" width="180"></el-table-column>
<el-table-column prop="amount" :formatter="(row,column,cellValue,index) => {return convertNum(cellValue);}" label="数量"></el-table-column>
</el-table>
// 交易 ID 单元格点击跳转
txidUrl(row, column, cell, event){
//
console.log('row',row)
console.log('column',column)
console.log('cell',cell)
console.log('event',event)
if (column.label == "交易 ID") {console.log(row.txExplorer)
// 整行的数据都在 row 里
window.location.href= row.txExplorer;
}
},
正文完