Commit 704af49f authored by 晓彤's avatar 晓彤

修改复选框只能单选

parent e1ac564a
......@@ -45,7 +45,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-table :data="sceneCaseForm.caseList" border style="width: 100%;margin-left:1px" @selection-change="handleSelectionChange">
<el-table ref="multipleTable" :data="sceneCaseForm.caseList" border style="width: 100%;margin-left:1px" @selection-change="handleSelectionChange" @select="select" @select-all="selectAll">
<el-table-column type="selection" style="width:10%">
</el-table-column>
<el-table-column type='index' style="width:15%"></el-table-column>
......@@ -402,6 +402,17 @@ export default {
handleSelectionChange(row) {
this.sceneCaseForm.caseDetialList = row
},
select(selection, row) {
if (selection.length > 1) {
let delRow = selection.shift()
this.$refs.multipleTable.toggleRowSelection(delRow, false)
}
},
selectAll(selection) {
if (selection.length > 1) {
selection.length = 1
}
},
// 添加确定按钮
addSceneFrom() {
this.sceneTestcaseList.push({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment