current-change:點擊單選按鈕時觸發,返回的參數currentRow, oldCurrentRow
row-dblclick: 當某一行被雙擊時會觸發該事件,返回的參數row, column, event
<el-table :data="tableData"
border
highlight-current-row
@current-change="handleSelectionChange"
@row-click="chooseone"
>
<el-table-column width="55">
<template slot-scope="scope">
<el-radio v-model="radioId" :label="scope.row.id">
<span class="el-radio__label"></span>
</el-radio>
</template>
</el-table-column>
</el-table>
data() { return { tableData: [], //表格數據 radioId: null, //單選框綁定的值 currentSelectItem: {} //當前選中的行數據 } }
methods: { handleSelectionChange(row) { this.currentSelectItem = row this.radioId = row.id }, chooseone(row){ this.currentSelectItem = row this.radioId = row.id } }