From 8a41b47794bdaf576c6f4f5c7b3ed163181a0a7a Mon Sep 17 00:00:00 2001 From: zhangyu Date: Tue, 10 Nov 2020 16:33:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9=20editendpoint?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=BD=BF=E7=94=A8=E9=94=99=E8=AF=AF=20?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=96=B0=E5=A2=9E=20key=E7=9A=84=E5=80=BC?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=A2=AB=E4=BF=9D=E7=95=99=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/rightBox/addEndpointBox.vue | 2 +- .../common/rightBox/editEndpointBox.vue | 15 +++++++-------- .../src/components/common/rightBox/moduleBox.vue | 2 +- .../common/rightBox/trafficSetting/subBox.vue | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index abaeb1300..ce4a2fafa 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -485,7 +485,7 @@ this.inputKeyErr.splice(index, 1); }, validateInput:function(value,index){ - if(!/^[a-zA-Z_:][a-zA-Z0-9_:]*/.test(value)){ + if(!/[a-zA-Z_:][a-zA-Z0-9_:]*/.test(value)){ this.inputKeyErr.splice(index,1,true) }else{ this.inputKeyErr.splice(index,1,false) diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue index 78540c874..e3b1aeb40 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBox.vue @@ -99,8 +99,8 @@
-
- +
+ = @@ -186,7 +186,7 @@ // 清除param clearAllParam() { - this.endpoint.paramObj = []; + this.editEndpoint.paramObj = []; this.$nextTick(() => { this.$refs.paramBoxScrollbar.update(); }); @@ -194,7 +194,7 @@ // 新增param addParam() { - this.endpoint.paramObj.push({key: '', value: ''}); + this.editEndpoint.paramObj.push({key: '', value: ''}); this.$nextTick(() => { this.$refs.paramBoxScrollbar.update(); }); @@ -202,7 +202,7 @@ // 移除单个param removeParam(index) { - this.endpoint.paramObj.splice(index, 1); + this.editEndpoint.paramObj.splice(index, 1); this.$nextTick(() => { this.$refs.paramBoxScrollbar.update(); }); @@ -224,15 +224,14 @@ // 新增label addLabel() { - console.log(123123); - this.endpoint.labelModule.push({key: '', value: ''}); + this.editEndpoint.labelModule.push({key: '', value: ''}); this.$nextTick(() => { this.$refs.labelBoxScrollbar.update(); }); }, // 移除单个Label removeLabel(index) { - this.endpoint.labelModule.splice(index, 1); + this.editEndpoint.labelModule.splice(index, 1); this.$nextTick(() => { this.$refs.labelBoxScrollbar.update(); }); diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue index ef44dd91d..f8be462b0 100644 --- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue @@ -283,7 +283,7 @@
- + = diff --git a/nezha-fronted/src/components/common/rightBox/trafficSetting/subBox.vue b/nezha-fronted/src/components/common/rightBox/trafficSetting/subBox.vue index 8f6cdcbc9..262fcbbcd 100644 --- a/nezha-fronted/src/components/common/rightBox/trafficSetting/subBox.vue +++ b/nezha-fronted/src/components/common/rightBox/trafficSetting/subBox.vue @@ -81,7 +81,7 @@ this.inputKeyErr.push(false); }, validateInput:function(value,index){ - if(!/^[a-zA-Z_:][a-zA-Z0-9_:]*/.test(value)){ + if(!/[a-zA-Z_:][a-zA-Z0-9_:]*/.test(value)){ this.inputKeyErr.splice(index,1,true) }else{ this.inputKeyErr.splice(index,1,false)