Skip to content

Commit a2de0bc

Browse files
committed
chore: 🔨 补充语言文件
1 parent 13a4896 commit a2de0bc

File tree

36 files changed

+350
-86
lines changed

36 files changed

+350
-86
lines changed

assets/seed-data/Sys_RoleApi.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,21 @@
4242
{
4343
"ApiId": "api/sys/user/set.session.user.app.config",
4444
"RoleId": 371729946431493,
45+
},
46+
{
47+
"ApiId": "api/sys/login.log/paged.query",
48+
"RoleId": 371729946431493,
49+
},
50+
{
51+
"ApiId": "api/sys/login.log/get",
52+
"RoleId": 371729946431493,
53+
},
54+
{
55+
"ApiId": "api/sys/login.log/count.by",
56+
"RoleId": 371729946431493,
57+
},
58+
{
59+
"ApiId": "api/sys/login.log/export",
60+
"RoleId": 371729946431493,
4561
}
4662
]

src/frontend/admin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"sortablejs": "1.15.6",
2424
"vkbeautify": "0.99.3",
2525
"vue": "3.5.13",
26-
"vue-i18n": "10.0.5",
26+
"vue-i18n": "11.0.1",
2727
"vue-router": "4.5.0",
2828
"vue3-ace-editor": "2.2.4",
2929
"vue3-json-viewer": "2.2.2",
@@ -36,7 +36,7 @@
3636
"prettier-plugin-organize-attributes": "1.0.0",
3737
"sass": "1.83.0",
3838
"terser": "5.37.0",
39-
"vite": "6.0.5"
39+
"vite": "6.0.6"
4040
},
4141
"browserslist": [
4242
"> 1%",

src/frontend/admin/src/components/naInfo/index.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ export default {
5656
this.data = this.$TOOL.sortProperties(res.data)
5757
if (queryEs) {
5858
this.esData = {}
59-
this.$API.adm_tools.queryEsLog.post(queryEs).then((res) => {
60-
this.esData = res.data
61-
})
59+
try {
60+
this.$API.adm_tools.queryEsLog.post(queryEs).then((res) => {
61+
this.esData = res.data
62+
})
63+
} catch {}
6264
}
6365
return this
6466
},

src/frontend/admin/src/components/scTable/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ export default {
525525
this.loading = true
526526
try {
527527
await this.exportApi.post(this.getQueryParams(), { responseType: 'blob' })
528-
this.$message.success(`数据已导出(上限5万条)`)
528+
this.$message.success(this.$t('数据已导出(上限 {n} 条)', { n: 50000 }))
529529
} catch {}
530530
this.loading = false
531531
},

src/frontend/admin/src/config/naFormEmail.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
email: (_this) => {
33
return {
44
required: true,
5-
message: '您的邮箱地址',
5+
message: _this.$t('您的邮箱地址'),
66
pattern: _this.$GLOBAL.chars.RGXL_EMAIL,
77
}
88
},
@@ -20,16 +20,16 @@ export default {
2020
} catch {
2121
//
2222
}
23-
callback(new Error('邮箱已被使用'))
23+
callback(new Error(_this.$t('邮箱已被使用')))
2424
},
2525
trigger: 'blur',
2626
}
2727
},
2828

29-
code: () => {
29+
code: (_this) => {
3030
return {
3131
required: true,
32-
message: '请输入4位数字验证码',
32+
message: _this.$t('请输入4位数字验证码'),
3333
}
3434
},
3535
}

src/frontend/admin/src/config/naFormPassword.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ export default {
22
passwordText: (_this) => {
33
return {
44
required: true,
5-
message: '8位以上数字字母组合',
5+
message: _this.$t('8位以上数字字母组合'),
66
pattern: _this.$GLOBAL.chars.RGX_PASSWORD,
77
}
88
},
99

10-
passwordText2: (passwordText) => [
11-
{ required: true, message: '请再次输入密码' },
10+
passwordText2: (_this, passwordText) => [
11+
{ required: true, message: _this.$t('请再次输入密码') },
1212
{
1313
validator: (rule, value, callback) => {
1414
if (value !== passwordText()) {
15-
callback(new Error('两次输入密码不一致'))
15+
callback(new Error(_this.$t('两次输入密码不一致')))
1616
} else {
1717
callback()
1818
}

src/frontend/admin/src/config/naFormPhone.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
mobile: (_this) => {
33
return {
44
required: true,
5-
message: '您的手机号码',
5+
message: _this.$t('您的手机号码'),
66
pattern: _this.$GLOBAL.chars.RGX_MOBILE,
77
}
88
},
@@ -20,16 +20,16 @@ export default {
2020
} catch {
2121
//
2222
}
23-
callback(new Error('手机号已被使用'))
23+
callback(new Error(_this.$t('手机号已被使用')))
2424
},
2525
trigger: 'blur',
2626
}
2727
},
2828

29-
code: () => {
29+
code: (_this) => {
3030
return {
3131
required: true,
32-
message: '请输入4位数字验证码',
32+
message: _this.$t('请输入4位数字验证码'),
3333
}
3434
},
3535
}

src/frontend/admin/src/directives/time.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export default (el, binding) => {
99
value = value * 1000
1010
}
1111
if (modifiers.tip) {
12-
el.innerHTML = tool.time.getFormatTime(value)
12+
el.innerHTML = tool.time.getFormatTime(binding.instance, value)
1313
el.__timeout__ = setInterval(() => {
14-
el.innerHTML = tool.time.getFormatTime(value)
14+
el.innerHTML = tool.time.getFormatTime(binding.instance, value)
1515
}, 60000)
1616
} else {
1717
const format = el.getAttribute('format') || undefined

src/frontend/admin/src/layout/components/NavMenu.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<component :is="navMenu.meta.icon || 'el-icon-menu'" />
1010
</el-icon>
1111
<template #title>
12-
<span>{{ navMenu.meta.title }}</span>
12+
<span>{{ this.$t(navMenu.meta.title) }}</span>
1313
<span v-if="navMenu.meta.tag" class="menu-tag">{{ navMenu.meta.tag }}</span>
1414
</template>
1515
</el-menu-item>
@@ -18,7 +18,7 @@
1818
<el-icon v-if="navMenu.meta && navMenu.meta.icon">
1919
<component :is="navMenu.meta.icon || 'el-icon-menu'" />
2020
</el-icon>
21-
<span>{{ navMenu.meta.title }}</span>
21+
<span>{{ this.$t(navMenu.meta.title) }}</span>
2222
<span v-if="navMenu.meta.tag" class="menu-tag">{{ navMenu.meta.tag }}</span>
2323
</template>
2424
<NavMenu :navMenus="navMenu.children"></NavMenu>

src/frontend/admin/src/layout/components/tags.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
:class="[isActive(tag) ? 'active' : '', tag.meta.affix ? 'affix' : '']"
88
@contextmenu.prevent="openContextMenu($event, tag)">
99
<router-link :to="tag">
10-
<span>{{ tag.meta.title }}</span>
10+
<span>{{ $t(tag.meta.title) }}</span>
1111
<el-icon v-if="!tag.meta.affix" @click.prevent.stop="closeSelectedTag(tag)">
1212
<el-icon-close />
1313
</el-icon>
@@ -22,39 +22,39 @@
2222
<el-icon>
2323
<el-icon-refresh />
2424
</el-icon>
25-
刷新
25+
{{ $t('刷新') }}
2626
</li>
2727
<li @click="scheduledRefresh()">
2828
<el-icon>
2929
<el-icon-alarm-clock />
3030
</el-icon>
31-
定时刷新
31+
{{ $t('定时刷新') }}
3232
</li>
3333
<hr />
3434
<li :class="contextMenuItem.meta.affix ? 'disabled' : ''" @click="closeTabs()">
3535
<el-icon>
3636
<el-icon-close />
3737
</el-icon>
38-
关闭标签
38+
{{ $t('关闭标签') }}
3939
</li>
4040
<li @click="closeOtherTabs()">
4141
<el-icon>
4242
<el-icon-folder-delete />
4343
</el-icon>
44-
关闭其他标签
44+
{{ $t('关闭其他标签') }}
4545
</li>
4646
<hr />
4747
<li @click="maximize()">
4848
<el-icon>
4949
<el-icon-full-screen />
5050
</el-icon>
51-
最大化
51+
{{ $t('最大化') }}
5252
</li>
5353
<li @click="openWindow()">
5454
<el-icon>
5555
<el-icon-copy-document />
5656
</el-icon>
57-
在新的窗口中打开
57+
{{ $t('在新的窗口中打开') }}
5858
</li>
5959
</ul>
6060
</transition>
@@ -200,9 +200,9 @@ export default {
200200
async scheduledRefresh() {
201201
this.closeMenu()
202202
try {
203-
const sleep = await this.$prompt('刷新时间间隔(秒)', '定时刷新', {
203+
const sleep = await this.$prompt(this.$t('刷新时间间隔(秒)'), this.$t('定时刷新'), {
204204
inputPattern: /^[1-9]\d*$/,
205-
inputErrorMessage: '时间必须为数字',
205+
inputErrorMessage: this.$t('时间必须为数字'),
206206
inputValue: '10',
207207
})
208208
const sleepSecs = parseInt(sleep.value)

0 commit comments

Comments
 (0)