From ce186154a0362020e61ef411eca53899b25c544a Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 16 Jun 2021 15:58:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E9=80=89=E9=A1=B9=E5=80=BC=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workspace/template/CustomFieldEdit.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frontend/src/business/components/settings/workspace/template/CustomFieldEdit.vue b/frontend/src/business/components/settings/workspace/template/CustomFieldEdit.vue index 45592910c6..910d66d55d 100644 --- a/frontend/src/business/components/settings/workspace/template/CustomFieldEdit.vue +++ b/frontend/src/business/components/settings/workspace/template/CustomFieldEdit.vue @@ -143,15 +143,17 @@ export default { let param = {}; Object.assign(param, this.form); param.workspaceId = getCurrentWorkspaceId(); - if (['select','multipleSelect','radio','checkbox'].indexOf(param.type) > -1 && param.options.length < 1) { - this.$warning(this.$t('custom_field.option_check')); - return; - } - for (const item of param.options) { - if (!item.text || !item.value) { - this.$warning(this.$t('custom_field.option_value_check')); + if (['select','multipleSelect','radio','checkbox'].indexOf(param.type) > -1) { + if (param.options.length < 1) { + this.$warning(this.$t('custom_field.option_check')); return; } + for (const item of param.options) { + if (!item.text || !item.value) { + this.$warning(this.$t('custom_field.option_value_check')); + return; + } + } } param.options = JSON.stringify(this.form.options); this.result = this.$post(this.url, param, (response) => {