美文网首页
el-table单选功能

el-table单选功能

作者: 秀萝卜 | 来源:发表于2020-09-04 09:54 被阅读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);
        },

相关文章

网友评论

      本文标题:el-table单选功能

      本文链接:https://www.haomeiwen.com/subject/gueosktx.html