Skip to content

Commit 94b21a9

Browse files
committed
fix: bug fix
1 parent cebf845 commit 94b21a9

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

frontend/src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"AI Model Configuration": "AI Model Configuration"
77
},
88
"common": {
9+
"limited_to_30": "The number of data tables is limited to 30",
910
"enter_your_password": "Please enter your password",
1011
"your_account_email_address": "Please enter your account/email address",
1112
"the_correct_password": "Please enter the correct password",

frontend/src/i18n/zh-CN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"AI Model Configuration": "模型配置"
77
},
88
"common": {
9+
"limited_to_30": "数据表数量限制30",
910
"enter_your_password": "请输入密码",
1011
"your_account_email_address": "请输入账号/邮箱",
1112
"the_correct_password": "请输入正确的密码",

frontend/src/views/ds/DatasourceForm.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ const save = async (formEl: FormInstance | undefined) => {
233233
if (!formEl) return
234234
await formEl.validate((valid) => {
235235
if (valid) {
236-
saveLoading.value = true
237236
const list = tableList.value
238237
.filter((ele: any) => {
239238
return checkList.value.includes(ele.tableName)
@@ -242,6 +241,12 @@ const save = async (formEl: FormInstance | undefined) => {
242241
return { table_name: ele.tableName, table_comment: ele.tableComment }
243242
})
244243
244+
if (checkList.value.length > 30) {
245+
ElMessage.error(t('common.limited_to_30'))
246+
return
247+
}
248+
saveLoading.value = true
249+
245250
const requestObj = buildConf()
246251
if (form.value.id) {
247252
if (!isEditTable.value) {
@@ -278,8 +283,6 @@ const save = async (formEl: FormInstance | undefined) => {
278283
.finally(() => {
279284
saveLoading.value = false
280285
})
281-
282-
console.log(a, 'datasourceApi')
283286
}
284287
}
285288
})

0 commit comments

Comments
 (0)