<el-table
:data="testCases"
style="width: 800px;height: 662px;overflow: auto;"
border
>
<el-table-column
type="index"
align="left"
label="序号"
width="80px"
:index="(index) => index + 1"
>
<template slot-scope="scope">
<el-radio
class="radio"
:label=" scope.$index + 1"
v-model="testCaseFlag"
@change="changeTestCases(scope.row)"
>
</el-radio>
</template>
</el-table-column>
<el-table-column
align="left"
prop="caseName"
label="用例名称"
min-width="180"
>
</el-table-column>
<el-table-column
align="left"
prop="createBy"
label="上传人"
min-width="180"
>
</el-table-column>
<el-table-column
align="left"
prop="createTime"
label="上传时间"
min-width="100"
>
</el-table-column>
</el-table>
data() {
return {
testCaseFlag: '',
}
}
methods: {
changeTestCases(row){
this.testCaseName=row.caseName
this.testCasesId=row.id
},
}
页面效果