mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 09:17:06 +08:00
fix(Terminology Configuration): Term name, synonyms cannot be repeated
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
"AI Model Configuration": "AI Model Configuration"
|
||||
},
|
||||
"professional": {
|
||||
"cannot_be_repeated": "Term name, synonyms cannot be repeated",
|
||||
"code_for_debugging": "Copy the following code for debugging",
|
||||
"full_screen_mode": "Full screen mode",
|
||||
"editing_terminology": "Editing Terminology",
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"AI Model Configuration": "模型配置"
|
||||
},
|
||||
"professional": {
|
||||
"cannot_be_repeated": "术语名称,同义词不能重复",
|
||||
"code_for_debugging": "复制以下代码进行调试",
|
||||
"full_screen_mode": "全屏模式",
|
||||
"editing_terminology": "编辑术语",
|
||||
|
||||
@@ -222,6 +222,10 @@ const rules = {
|
||||
const saveHandler = () => {
|
||||
termFormRef.value.validate((res: any) => {
|
||||
if (res) {
|
||||
const arr = [...pageForm.value.other_words.filter((ele) => !!ele), pageForm.value.word]
|
||||
if (arr.length !== new Set(arr).size) {
|
||||
return ElMessage.error(t('professional.cannot_be_repeated'))
|
||||
}
|
||||
const obj = unref(pageForm)
|
||||
if (!obj.id) {
|
||||
delete obj.id
|
||||
|
||||
Reference in New Issue
Block a user