Skip to content

Commit 6e29a30

Browse files
committed
fix: bug fix
1 parent acfd0a4 commit 6e29a30

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

frontend/src/i18n/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"AI Model Configuration": "AI Model Configuration"
77
},
88
"common": {
9+
"excessive_tables_selected": "Excessive tables selected",
10+
"to_continue_saving": "The number of selected tables is 67, exceeding {msg}. This may cause the operation to time out or become unresponsive. Do you want to continue saving?",
911
"proceed_with_caution": "Deletion is irreversible, so proceed with caution.",
1012
"sales_in_2024": "Delete conversation: {msg}?",
1113
"limited_to_30": "The number of data tables is limited to 30",

frontend/src/i18n/zh-CN.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"AI Model Configuration": "模型配置"
77
},
88
"common": {
9+
"excessive_tables_selected": "选择数据表过量",
10+
"to_continue_saving": "选择的数据表数量为: {msg},已超出30,可能会导致操作超时或者无响应,是否继续保存?",
911
"proceed_with_caution": "删除后无法恢复,请谨慎操作。",
1012
"sales_in_2024": "是否删除对话:{msg}?",
1113
"limited_to_30": "数据表数量限制30",

frontend/src/style.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ body {
172172
}
173173
}
174174

175+
.confirm-with_icon {
176+
border-radius: 12px;
177+
}
178+
175179
.form-content_error {
176180
.ed-form-item--default {
177181
margin-bottom: 16px;

frontend/src/views/ds/DatasourceForm.vue

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ const initForm = (item: any, editTable: boolean = false) => {
231231
232232
const save = async (formEl: FormInstance | undefined) => {
233233
if (!formEl) return
234-
await formEl.validate((valid) => {
234+
await formEl.validate(async (valid) => {
235235
if (valid) {
236236
const list = tableList.value
237237
.filter((ele: any) => {
@@ -242,8 +242,17 @@ const save = async (formEl: FormInstance | undefined) => {
242242
})
243243
244244
if (checkList.value.length > 30) {
245-
ElMessage.error(t('common.limited_to_30'))
246-
return
245+
const excessive = await ElMessageBox.confirm(t('common.excessive_tables_selected'), {
246+
tip: t('common.to_continue_saving', { msg: checkList.value.length }),
247+
confirmButtonText: t('common.save'),
248+
cancelButtonText: t('common.cancel'),
249+
confirmButtonType: 'primary',
250+
type: 'warning',
251+
customClass: 'confirm-with_icon',
252+
autofocus: false,
253+
})
254+
255+
if (excessive !== 'confirm') return
247256
}
248257
saveLoading.value = true
249258

0 commit comments

Comments
 (0)