el-table 实现单选

 <el-table v-loading="loading" highlight-current-row :data="tableData" border style="width: 100%" @current-change="handleSelectChange">
            <el-table-column label="选择" width="55" align="center" fixed="left">
              <template slot-scope="scope">
                <el-radio v-model="tableradio" :label="scope.row"><i /></el-radio>
              </template>
            </el-table-column>
           </el-table>
  handleSelectChange(currentRow) {
      this.tableradio = currentRow
      this.selectId = currentRow.eid
      console.log(currentRow)
    },

 

posted @ 2022-01-17 15:54  柠檬青味  阅读(2172)  评论(0编辑  收藏  举报