|
@@ -286,7 +286,7 @@
|
|
|
<el-button type="success" plain @click.prevent="addDomain(ruleForm)" style="float: right;">拷贝</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
|
- <el-button type="info" plain @click.prevent="removeDomain(ruleForm)" style="float: right;">删除</el-button>
|
|
|
+ <el-button type="info" plain @click.prevent="removeDomain(ruleForm)" style="float: right;" >删除</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
@@ -646,10 +646,13 @@ export default {
|
|
|
},
|
|
|
//删除自身
|
|
|
removeDomain(item) {
|
|
|
- var index = this.ruleForm.indexOf(item)
|
|
|
+ //如果子类大于1 可点击删除按钮
|
|
|
+ if(this.ruleForm.length>1){
|
|
|
+ var index = this.ruleForm.indexOf(item)
|
|
|
if (index !== -1) {
|
|
|
this.ruleForm.splice(index, 1)
|
|
|
}
|
|
|
+ }
|
|
|
this.flags()
|
|
|
},
|
|
|
// 表单添加一行
|