From 6cb602218e51d36404de6f12e4abb9c7e1b24257 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 4 Nov 2021 10:08:54 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-1168=20fix=EF=BC=9B=20Endpoint=20relabel=20?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9=EF=BC=8C=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/common/js/validate.js | 2 +- .../src/components/common/rightBox/editEndpointBoxNew.vue | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/js/validate.js b/nezha-fronted/src/components/common/js/validate.js index 438ae997b..a7c73d715 100644 --- a/nezha-fronted/src/components/common/js/validate.js +++ b/nezha-fronted/src/components/common/js/validate.js @@ -170,7 +170,7 @@ export function checkExprTempAge (rule, value, callback) { }, 100) } -export function arrLength (rule, value, callback) { // 校验经纬度 +export function arrLength (rule, value, callback) { // 校验数组 if (value.length > 0) { callback() } else { diff --git a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue index e2abc1e8d..73c1bdcab 100644 --- a/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue +++ b/nezha-fronted/src/components/common/rightBox/editEndpointBoxNew.vue @@ -257,7 +257,7 @@ class="half-form-item" :label="'Source labels'" :rules="[ { required: item.action === 'replace' || item.action === 'keep' || item.action === 'drop', message: $t('validate.required'), trigger: 'change' }, - { validator: item.action === 'replace' || item.action === 'keep' || item.action === 'drop'? arrLength : '', trigger: 'change' } + { validator: item.action === 'replace' || item.action === 'keep' || item.action === 'drop'? arrLength : requirdRelabel, trigger: 'change' } ]">