From 7d64f535b41b4d87f9de22fac5e21d9285315181 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 24 Jul 2025 13:54:58 +0800 Subject: [PATCH] fix: tab bug fix --- frontend/src/i18n/en.json | 1 + frontend/src/i18n/zh-CN.json | 1 + frontend/src/views/dashboard/components/sq-tab/index.vue | 2 +- frontend/src/views/dashboard/editor/index.vue | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index ee534d96..383cddca 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -32,6 +32,7 @@ "password_reset_successful": "Password reset successful" }, "dashboard": { + "new_tab": "New Tab", "length_limit64": "Field length must be between 1 and 64", "sort_column": "Sort field", "sort_type": "Sort type", diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index 6ceb58e2..ca01a0fb 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -34,6 +34,7 @@ "password_reset_successful": "重置密码成功" }, "dashboard": { + "new_tab": "新建Tab", "length_limit64": "字段长度需要在1-64之间", "sort_column": "排序字段", "sort_type": "排序方式", diff --git a/frontend/src/views/dashboard/components/sq-tab/index.vue b/frontend/src/views/dashboard/components/sq-tab/index.vue index 815ad3a7..652026b1 100644 --- a/frontend/src/views/dashboard/components/sq-tab/index.vue +++ b/frontend/src/views/dashboard/components/sq-tab/index.vue @@ -69,7 +69,7 @@ const state = reactive({ function addTab() { const newTab = { name: guid('tab'), - title: 'New Tab', + title: t('dashboard.new_tab'), componentData: [], closable: true, } diff --git a/frontend/src/views/dashboard/editor/index.vue b/frontend/src/views/dashboard/editor/index.vue index c70eeafd..1c8dc224 100644 --- a/frontend/src/views/dashboard/editor/index.vue +++ b/frontend/src/views/dashboard/editor/index.vue @@ -36,6 +36,8 @@ const addComponent = (componentType: string, viewInfo?: any) => { const subTabName = guid('tab') // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment component.propValue[0].name = subTabName + // @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment + component.propValue[0].title = t('dashboard.new_tab') component.activeTabName = subTabName } component.y = 100