perf:traffic setting 页面调整

This commit is contained in:
wangwenrui
2020-05-06 19:17:49 +08:00
parent 2e2732599f
commit 3e58bd4a41
7 changed files with 163 additions and 136 deletions

View File

@@ -165,10 +165,14 @@
return valid;
},
valiateRepeatFunc:function(host,index){
let temp=this.traffic.setting.find((item,i)=>{
return i != index && item.host == host;
})
return typeof temp == "undefined";
if(host != ''){
let temp=this.traffic.setting.find((item,i)=>{
return i != index && item.host == host;
})
return typeof temp == "undefined";
}else{
return true;
}
},
delAssetSetting:function(index){
this.uuids.splice(index,1);
@@ -300,7 +304,7 @@
direction:[],
ifindex:'',
ifdescr:' ',
tags:"",
tags:{},
edit:true,
}
]