el-table单选功能

2020-09-04  本文已影响0人  秀萝卜
<el-table  @row-click="rowClick" v-loading="loading" :data="tableData"
                style="width:100%;margin-top:10px;" stripe>
                <el-table-column label width="55">
                    <template slot-scope="scope">
                      <el-radio :label="scope.row.contractNumber" v-model="radioId">&nbsp;&nbsp;</el-radio>
                    </template>
                </el-table-column>
                <el-table-column prop="contractNumber" label="合同编号"></el-table-column>
            </el-table>


rowClick(row) {
            console.log("??")
            this.radioId = row.contractNumber
            this.temp = {
                purchaseId: row.purchaseId,
                contractNumber: row.contractNumber
            }
            console.log(this.radioId);
        },
上一篇 下一篇

猜你喜欢

热点阅读