From fc1e4eb965837b897bab08d093c3d6e9ae10aff2 Mon Sep 17 00:00:00 2001 From: ulleo Date: Wed, 3 Jul 2024 17:41:49 +0800 Subject: [PATCH] =?UTF-8?q?feat(X-Pack):=20[=E6=95=B0=E6=8D=AE=E5=A1=AB?= =?UTF-8?q?=E6=8A=A5]=E8=A1=A8=E5=8D=95=E7=BB=91=E5=AE=9A=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=BA=90=E9=9C=80=E4=B8=BA=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/frontend/src/lang/en.js | 1 + core/frontend/src/lang/tw.js | 1 + core/frontend/src/lang/zh.js | 1 + core/frontend/src/views/dataFilling/form/create.vue | 12 ++++++++++++ 4 files changed, 15 insertions(+) diff --git a/core/frontend/src/lang/en.js b/core/frontend/src/lang/en.js index 5c365b0ef3..183fcd8e8f 100644 --- a/core/frontend/src/lang/en.js +++ b/core/frontend/src/lang/en.js @@ -671,6 +671,7 @@ export default { form_update_rule_none: 'Update Rules cannot be null', form_components_cannot_null: 'Form components cannot be null', option_list_cannot_empty: 'Option list cannot be empty', + option_list_datasource_cannot_empty: 'Datasource Settings of option list cannot be empty', component_setting_error: 'Component setting error', table_name: 'Table', form_column: 'Form Column', diff --git a/core/frontend/src/lang/tw.js b/core/frontend/src/lang/tw.js index f482788fc8..6d21799be1 100644 --- a/core/frontend/src/lang/tw.js +++ b/core/frontend/src/lang/tw.js @@ -671,6 +671,7 @@ export default { form_update_rule_none: '請配置更新規則', form_components_cannot_null: '請添加表單組件', option_list_cannot_empty: '選項值不能為空', + option_list_datasource_cannot_empty: '選項值綁定數據源配置不能為空', component_setting_error: '組件設置錯誤', table_name: '數據庫表名', form_column: '表單字段', diff --git a/core/frontend/src/lang/zh.js b/core/frontend/src/lang/zh.js index 2278e68ee4..fbbcd58df5 100644 --- a/core/frontend/src/lang/zh.js +++ b/core/frontend/src/lang/zh.js @@ -669,6 +669,7 @@ export default { form_update_rule_none: '请配置更新规则', form_components_cannot_null: '请添加表单组件', option_list_cannot_empty: '选项值不能为空', + option_list_datasource_cannot_empty: '选项值绑定数据源配置不能为空', component_setting_error: '组件设置错误', table_name: '数据库表名', form_column: '表单字段', diff --git a/core/frontend/src/views/dataFilling/form/create.vue b/core/frontend/src/views/dataFilling/form/create.vue index 02560ec926..3eee0de508 100644 --- a/core/frontend/src/views/dataFilling/form/create.vue +++ b/core/frontend/src/views/dataFilling/form/create.vue @@ -722,6 +722,18 @@ export default { } } } + } else { + if (f.settings.optionDatasource === undefined || + f.settings.optionTable === undefined || + f.settings.optionColumn === undefined) { + this.selectItem(f.id) + this.$message({ + message: this.$t('data_fill.form.option_list_datasource_cannot_empty'), + type: 'error', + showClose: true + }) + return + } } } }