Skip to content

Commit 7d64f53

Browse files
committed
fix: tab bug fix
1 parent cd04b23 commit 7d64f53

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

frontend/src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"password_reset_successful": "Password reset successful"
3333
},
3434
"dashboard": {
35+
"new_tab": "New Tab",
3536
"length_limit64": "Field length must be between 1 and 64",
3637
"sort_column": "Sort field",
3738
"sort_type": "Sort type",

frontend/src/i18n/zh-CN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"password_reset_successful": "重置密码成功"
3535
},
3636
"dashboard": {
37+
"new_tab": "新建Tab",
3738
"length_limit64": "字段长度需要在1-64之间",
3839
"sort_column": "排序字段",
3940
"sort_type": "排序方式",

frontend/src/views/dashboard/components/sq-tab/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const state = reactive({
6969
function addTab() {
7070
const newTab = {
7171
name: guid('tab'),
72-
title: 'New Tab',
72+
title: t('dashboard.new_tab'),
7373
componentData: [],
7474
closable: true,
7575
}

frontend/src/views/dashboard/editor/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ const addComponent = (componentType: string, viewInfo?: any) => {
3636
const subTabName = guid('tab')
3737
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
3838
component.propValue[0].name = subTabName
39+
// @ts-expect-error eslint-disable-next-line @typescript-eslint/ban-ts-comment
40+
component.propValue[0].title = t('dashboard.new_tab')
3941
component.activeTabName = subTabName
4042
}
4143
component.y = 100

0 commit comments

Comments
 (0)