@liujitcn/kratos-admin-core 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/package/declarations/src/api/base/language.d.ts +8 -0
- package/dist/package/declarations/src/components/Dialog/ProDialog.vue.d.ts +1 -0
- package/dist/package/declarations/src/components/LocaleSwitch/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/index.d.ts +2 -0
- package/dist/package/declarations/src/locales/index.d.ts +63 -0
- package/dist/package/declarations/src/modules/index.d.ts +7 -2
- package/dist/package/declarations/src/request.d.ts +1 -0
- package/dist/package/declarations/src/routers/modules/staticRouter.d.ts +1 -0
- package/dist/package/declarations/src/rpc/base/v1/config.d.ts +2 -0
- package/dist/package/declarations/src/rpc/base/v1/language.d.ts +26 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +79 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_translation.d.ts +102 -0
- package/dist/package/declarations/src/stores/interface/index.d.ts +2 -0
- package/dist/package/declarations/src/stores/runtime.d.ts +1 -0
- package/dist/package/declarations/src/utils/dict.d.ts +2 -2
- package/dist/package/declarations/src/utils/index.d.ts +1 -1
- package/dist/package/declarations/src/utils/oauthProvider.d.ts +2 -0
- package/dist/package/declarations/src/utils/passwordStrength.d.ts +0 -7
- package/dist/package/src/App.vue +10 -1
- package/dist/package/src/api/base/language.ts +20 -0
- package/dist/package/src/api/base/oauth.ts +0 -1
- package/dist/package/src/api/system/auth.ts +0 -1
- package/dist/package/src/bootstrap.ts +57 -2
- package/dist/package/src/components/CronExpression/index.vue +80 -82
- package/dist/package/src/components/Dialog/FormDialog.vue +9 -4
- package/dist/package/src/components/Dialog/ProDialog.vue +10 -4
- package/dist/package/src/components/Dict/index.vue +5 -2
- package/dist/package/src/components/ECharts/config/index.ts +6 -1
- package/dist/package/src/components/ErrorMessage/index.vue +3 -1
- package/dist/package/src/components/ImportExcel/index.vue +29 -18
- package/dist/package/src/components/LocaleSwitch/index.vue +28 -0
- package/dist/package/src/components/PasswordStrength/index.vue +8 -5
- package/dist/package/src/components/ProForm/components/DynamicList.vue +8 -3
- package/dist/package/src/components/ProForm/components/KvList.vue +14 -6
- package/dist/package/src/components/ProTable/components/ColSetting.vue +7 -5
- package/dist/package/src/components/ProTable/components/TableColumn.vue +2 -1
- package/dist/package/src/components/ProTable/index.vue +36 -11
- package/dist/package/src/components/SearchForm/components/SearchFormItem.vue +9 -4
- package/dist/package/src/components/SearchForm/index.vue +6 -3
- package/dist/package/src/components/SelectFilter/index.vue +4 -1
- package/dist/package/src/components/SelectIcon/index.vue +8 -4
- package/dist/package/src/components/TreeFilter/index.vue +14 -6
- package/dist/package/src/components/Upload/File.vue +18 -13
- package/dist/package/src/components/Upload/Files.vue +22 -15
- package/dist/package/src/components/Upload/Img.vue +14 -11
- package/dist/package/src/components/Upload/Imgs.vue +15 -12
- package/dist/package/src/components/WangEditor/index.vue +12 -4
- package/dist/package/src/directives/modules/copy.ts +2 -1
- package/dist/package/src/hooks/useDownload.ts +3 -2
- package/dist/package/src/hooks/useHandleData.ts +5 -4
- package/dist/package/src/hooks/useTheme.ts +2 -1
- package/dist/package/src/hooks/useTime.ts +11 -2
- package/dist/package/src/index.ts +2 -0
- package/dist/package/src/layouts/components/Header/ToolBarRight.vue +2 -0
- package/dist/package/src/layouts/components/Header/components/AssemblySize.vue +8 -6
- package/dist/package/src/layouts/components/Header/components/Avatar.vue +11 -9
- package/dist/package/src/layouts/components/Header/components/Breadcrumb.vue +10 -2
- package/dist/package/src/layouts/components/Header/components/Fullscreen.vue +4 -2
- package/dist/package/src/layouts/components/Header/components/InfoDialog.vue +6 -3
- package/dist/package/src/layouts/components/Header/components/PasswordDialog.vue +6 -3
- package/dist/package/src/layouts/components/Header/components/SearchMenu.vue +5 -3
- package/dist/package/src/layouts/components/Header/components/ThemeSetting.vue +3 -1
- package/dist/package/src/layouts/components/Tabs/components/MoreButton.vue +9 -7
- package/dist/package/src/layouts/components/ThemeDrawer/index.vue +27 -24
- package/dist/package/src/locales/README.md +15 -0
- package/dist/package/src/locales/en-US.json +258 -0
- package/dist/package/src/locales/es-ES.json +258 -0
- package/dist/package/src/locales/fr-FR.json +258 -0
- package/dist/package/src/locales/index.ts +223 -0
- package/dist/package/src/locales/ja-JP.json +258 -0
- package/dist/package/src/locales/ko-KR.json +258 -0
- package/dist/package/src/locales/zh-CN.json +258 -0
- package/dist/package/src/locales/zh-TW.json +258 -0
- package/dist/package/src/modules/index.ts +7 -2
- package/dist/package/src/modules/kratosAdmin.ts +19 -1
- package/dist/package/src/request.ts +8 -1
- package/dist/package/src/routers/index.ts +4 -1
- package/dist/package/src/routers/modules/dynamicRouter.ts +3 -2
- package/dist/package/src/routers/modules/staticRouter.ts +8 -4
- package/dist/package/src/rpc/base/v1/config.ts +2 -0
- package/dist/package/src/rpc/base/v1/language.ts +37 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +81 -0
- package/dist/package/src/rpc/system/admin/v1/base_translation.ts +117 -0
- package/dist/package/src/stores/interface/index.ts +2 -0
- package/dist/package/src/stores/modules/config.ts +5 -1
- package/dist/package/src/stores/modules/user.ts +2 -1
- package/dist/package/src/stores/runtime.ts +1 -0
- package/dist/package/src/utils/color.ts +5 -4
- package/dist/package/src/utils/dict.ts +27 -4
- package/dist/package/src/utils/eleValidate.ts +3 -2
- package/dist/package/src/utils/errorHandler.ts +9 -8
- package/dist/package/src/utils/index.ts +7 -6
- package/dist/package/src/utils/oauthProvider.ts +15 -10
- package/dist/package/src/utils/passwordCrypto.ts +3 -2
- package/dist/package/src/utils/passwordStrength.ts +1 -16
- package/dist/package/src/utils/request.ts +13 -8
- package/dist/package/src/views/error/403.vue +3 -1
- package/dist/package/src/views/error/404.vue +3 -1
- package/dist/package/src/views/error/500.vue +3 -1
- package/dist/package/src/views/error/pending.vue +5 -2
- package/dist/package/src/views/login/components/LoginForm.vue +53 -27
- package/dist/package/src/views/login/index.scss +6 -0
- package/dist/package/src/views/login/index.vue +2 -0
- package/dist/package/types/generated/auto-imports.d.ts +129 -111
- package/dist/package/types/generated/components.d.ts +67 -67
- package/package.json +3 -1
- package/types/generated/auto-imports.d.ts +129 -111
- package/types/generated/components.d.ts +67 -67
- package/vite.config.ts +8 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common.action.back": "返回",
|
|
3
|
+
"common.action.cancel": "取消",
|
|
4
|
+
"common.action.close": "關閉",
|
|
5
|
+
"common.action.confirm": "確定",
|
|
6
|
+
"common.action.create": "新增",
|
|
7
|
+
"common.action.delete": "刪除",
|
|
8
|
+
"common.action.download": "下載",
|
|
9
|
+
"common.action.edit": "編輯",
|
|
10
|
+
"common.action.expand": "展開",
|
|
11
|
+
"common.action.collapse": "收起",
|
|
12
|
+
"common.action.login": "登入",
|
|
13
|
+
"common.action.logout": "退出登入",
|
|
14
|
+
"common.action.reset": "重置",
|
|
15
|
+
"common.action.retry": "重試",
|
|
16
|
+
"common.action.save": "儲存",
|
|
17
|
+
"common.action.search": "搜尋",
|
|
18
|
+
"common.action.upload": "上傳",
|
|
19
|
+
"common.action.view": "檢視",
|
|
20
|
+
"common.field.endTime": "結束時間",
|
|
21
|
+
"common.field.language": "語言",
|
|
22
|
+
"common.field.operation": "操作",
|
|
23
|
+
"common.field.parameterName": "引數名",
|
|
24
|
+
"common.field.parameterValue": "引數值",
|
|
25
|
+
"common.field.phone": "手機號碼",
|
|
26
|
+
"common.field.startTime": "開始時間",
|
|
27
|
+
"common.language.en-US": "English",
|
|
28
|
+
"common.language.ja-JP": "日本語",
|
|
29
|
+
"common.language.zh-CN": "簡體中文",
|
|
30
|
+
"common.language.zh-TW": "繁體中文",
|
|
31
|
+
"common.language.ko-KR": "韓語",
|
|
32
|
+
"common.language.fr-FR": "法語",
|
|
33
|
+
"common.language.es-ES": "西班牙語",
|
|
34
|
+
"common.message.loading": "載入中",
|
|
35
|
+
"common.message.noData": "暫無資料",
|
|
36
|
+
"common.message.operationSuccess": "操作成功",
|
|
37
|
+
"common.message.systemError": "系統出錯",
|
|
38
|
+
"common.message.unknown": "暫時無法處理,請稍後重試",
|
|
39
|
+
"common.validation.phoneInvalid": "請輸入正確的手機號碼",
|
|
40
|
+
"common.validation.phoneRequired": "請輸入手機號碼",
|
|
41
|
+
"common.title.notice": "提示",
|
|
42
|
+
"common.title.warning": "溫馨提示",
|
|
43
|
+
"common.placeholder.input": "請輸入",
|
|
44
|
+
"common.placeholder.inputContent": "請輸入內容",
|
|
45
|
+
"common.placeholder.select": "請選擇",
|
|
46
|
+
"common.status.disabled": "禁用",
|
|
47
|
+
"common.status.enabled": "啟用",
|
|
48
|
+
"common.value.female": "女",
|
|
49
|
+
"common.value.male": "男",
|
|
50
|
+
"common.value.all": "全部",
|
|
51
|
+
"core.auth.loginAgain": "重新登入",
|
|
52
|
+
"core.auth.refreshTokenMissing": "重新整理令牌不存在",
|
|
53
|
+
"core.auth.sessionExpired": "登入狀態已失效,請重新登入",
|
|
54
|
+
"core.auth.noMenuPermission": "當前賬號無任何選單許可權,請聯絡系統管理員",
|
|
55
|
+
"core.auth.noPermission": "無許可權訪問",
|
|
56
|
+
"core.clipboard.success": "複製成功",
|
|
57
|
+
"core.cron.cycleUnit.day": "天",
|
|
58
|
+
"core.cron.cycleUnit.hour": "小時",
|
|
59
|
+
"core.cron.cycleUnit.minute": "分鐘",
|
|
60
|
+
"core.cron.cycleUnit.month": "個月",
|
|
61
|
+
"core.cron.cycleUnit.second": "秒",
|
|
62
|
+
"core.cron.cycleUnit.year": "年",
|
|
63
|
+
"core.cron.description.every": "每{unit}",
|
|
64
|
+
"core.cron.description.range": "{segment}{start}到{end}",
|
|
65
|
+
"core.cron.description.specific": "{segment}指定為 {values}",
|
|
66
|
+
"core.cron.description.step": "從{start}{unit}開始,每{step}{cycleUnit}執行一次",
|
|
67
|
+
"core.cron.description.unspecified": "{segment}不指定",
|
|
68
|
+
"core.cron.description.weekday": "本月 {day} 號最近的工作日",
|
|
69
|
+
"core.cron.descriptionSeparator": ",",
|
|
70
|
+
"core.cron.edit": "編輯表示式",
|
|
71
|
+
"core.cron.everyUnit": "每{unit}",
|
|
72
|
+
"core.cron.expression": "Cron 表示式",
|
|
73
|
+
"core.cron.from": "從",
|
|
74
|
+
"core.cron.lastDay": "本月最後一天",
|
|
75
|
+
"core.cron.nearestWorkday": "號最近的工作日",
|
|
76
|
+
"core.cron.notConfigured": "未配置執行規則",
|
|
77
|
+
"core.cron.placeholder": "請輸入 Cron 表示式",
|
|
78
|
+
"core.cron.preset.dailyEight": "每天早上 8 點執行",
|
|
79
|
+
"core.cron.preset.dailyMidnight": "每天零點執行",
|
|
80
|
+
"core.cron.preset.everyFiveMinutes": "每 5 分鐘執行",
|
|
81
|
+
"core.cron.preset.everyHour": "每小時執行",
|
|
82
|
+
"core.cron.preset.everyMinute": "每分鐘執行",
|
|
83
|
+
"core.cron.preset.monthlyFirst": "每月 1 號零點執行",
|
|
84
|
+
"core.cron.preset.nextYearDaily": "明年每天零點執行",
|
|
85
|
+
"core.cron.presets": "常用表示式",
|
|
86
|
+
"core.cron.range": "週期",
|
|
87
|
+
"core.cron.repeat": "迴圈",
|
|
88
|
+
"core.cron.runOnce": "{unit}執行一次",
|
|
89
|
+
"core.cron.segment.day": "日期",
|
|
90
|
+
"core.cron.segment.hour": "小時",
|
|
91
|
+
"core.cron.segment.minute": "分鐘",
|
|
92
|
+
"core.cron.segment.month": "月份",
|
|
93
|
+
"core.cron.segment.second": "秒",
|
|
94
|
+
"core.cron.segment.year": "年份",
|
|
95
|
+
"core.cron.specific": "指定",
|
|
96
|
+
"core.cron.startEvery": "{unit}開始,每",
|
|
97
|
+
"core.cron.thisMonth": "本月",
|
|
98
|
+
"core.cron.title": "編輯定時表示式",
|
|
99
|
+
"core.cron.to": "至",
|
|
100
|
+
"core.cron.unit.day": "日",
|
|
101
|
+
"core.cron.unit.hour": "時",
|
|
102
|
+
"core.cron.unit.minute": "分",
|
|
103
|
+
"core.cron.unit.month": "月",
|
|
104
|
+
"core.cron.unit.second": "秒",
|
|
105
|
+
"core.cron.unit.year": "年",
|
|
106
|
+
"core.cron.unspecified": "不指定",
|
|
107
|
+
"core.cron.valueSeparator": "、",
|
|
108
|
+
"core.cron.valueWithUnit": "{value}{unit}",
|
|
109
|
+
"core.cron.workday": "工作日",
|
|
110
|
+
"core.data.confirmAction": "是否{action}?",
|
|
111
|
+
"core.data.operationSuccess": "{action}成功",
|
|
112
|
+
"core.download.largeFileNotice": "資料量較大時下載會較慢,請耐心等待",
|
|
113
|
+
"core.error.403.detail": "抱歉,您沒有許可權訪問此頁面",
|
|
114
|
+
"core.error.403.title": "訪問受限",
|
|
115
|
+
"core.error.404.detail": "抱歉,您訪問的頁面不存在",
|
|
116
|
+
"core.error.404.title": "頁面不存在",
|
|
117
|
+
"core.error.500.detail": "抱歉,伺服器發生錯誤",
|
|
118
|
+
"core.error.500.title": "伺服器錯誤",
|
|
119
|
+
"core.error.pending.detail": "該頁面功能正在建設中",
|
|
120
|
+
"core.error.pending.title": "敬請期待",
|
|
121
|
+
"core.error.javascript.eval": "Eval 使用錯誤",
|
|
122
|
+
"core.error.javascript.internal": "JavaScript 引擎內部錯誤",
|
|
123
|
+
"core.error.javascript.range": "引數超出允許範圍",
|
|
124
|
+
"core.error.javascript.reference": "未找到物件",
|
|
125
|
+
"core.error.javascript.syntax": "語法錯誤",
|
|
126
|
+
"core.error.javascript.type": "使用了錯誤的型別或物件",
|
|
127
|
+
"core.error.javascript.unknown": "未知錯誤",
|
|
128
|
+
"core.error.javascript.uri": "URI 錯誤",
|
|
129
|
+
"core.header.fullscreen": "全屏",
|
|
130
|
+
"core.header.fullscreenExit": "退出全屏",
|
|
131
|
+
"core.header.fullscreenUnsupported": "當前瀏覽器不支援全屏",
|
|
132
|
+
"core.header.language": "切換語言",
|
|
133
|
+
"core.header.menuSearch": "選單搜尋",
|
|
134
|
+
"core.header.menuSearchEmpty": "暫無選單",
|
|
135
|
+
"core.header.menuSearchPlaceholder": "選單搜尋:支援選單名稱、路徑",
|
|
136
|
+
"core.header.size.default": "預設",
|
|
137
|
+
"core.header.size.large": "大型",
|
|
138
|
+
"core.header.size.small": "小型",
|
|
139
|
+
"core.header.sizeSelect": "元件大小",
|
|
140
|
+
"core.header.theme": "主題設定",
|
|
141
|
+
"core.icon.empty": "未搜尋到您要找的圖示",
|
|
142
|
+
"core.icon.placeholder": "請選擇圖示",
|
|
143
|
+
"core.icon.search": "搜尋圖示",
|
|
144
|
+
"core.layout.departmentUnassigned": "未分配部門",
|
|
145
|
+
"core.layout.home": "首頁",
|
|
146
|
+
"core.layout.info": "個人資訊",
|
|
147
|
+
"core.layout.passwordChange": "修改密碼",
|
|
148
|
+
"core.layout.unnamedMenu": "未命名選單",
|
|
149
|
+
"core.layout.logoutConfirm": "您是否確認退出登入?",
|
|
150
|
+
"core.layout.logoutSuccess": "退出登入成功",
|
|
151
|
+
"core.layout.notSet": "未設定",
|
|
152
|
+
"core.layout.profile": "個人中心",
|
|
153
|
+
"core.layout.roleUnassigned": "未分配角色",
|
|
154
|
+
"core.login.behaviorClick": "請按順序點選文字",
|
|
155
|
+
"core.login.behaviorConfirm": "確認",
|
|
156
|
+
"core.login.behaviorPuzzle": "請拖動滑塊完成拼圖",
|
|
157
|
+
"core.login.behaviorRotate": "拖動滑塊,將內圈圖片轉正",
|
|
158
|
+
"core.login.captcha": "請輸入驗證碼",
|
|
159
|
+
"core.login.captchaAlt": "驗證碼",
|
|
160
|
+
"core.login.greeting.afternoon": "下午好",
|
|
161
|
+
"core.login.greeting.evening": "晚上好",
|
|
162
|
+
"core.login.greeting.morning": "早上好",
|
|
163
|
+
"core.login.greeting.night": "凌晨好",
|
|
164
|
+
"core.login.greeting.noon": "中午好",
|
|
165
|
+
"core.login.otherMethods": "其他登入方式",
|
|
166
|
+
"core.login.password": "請輸入密碼",
|
|
167
|
+
"core.login.tenantCode": "請輸入租戶編碼",
|
|
168
|
+
"core.login.userName": "請輸入使用者名稱",
|
|
169
|
+
"core.login.welcome": "歡迎登入管理後臺",
|
|
170
|
+
"core.oauth.dingtalk": "釘釘",
|
|
171
|
+
"core.oauth.feishu": "飛書",
|
|
172
|
+
"core.oauth.wechat": "微信",
|
|
173
|
+
"core.oauth.wechatmp": "微信公眾號",
|
|
174
|
+
"core.oauth.wechatwork": "企業微信",
|
|
175
|
+
"core.oauth.unknown": "未知方式",
|
|
176
|
+
"core.password.error": "密碼需同時包含大小寫字母、數字、特殊字元,且長度不少於 8 位",
|
|
177
|
+
"core.password.cryptoUnsupported": "當前環境不支援密碼加密",
|
|
178
|
+
"core.password.required": "密碼不能為空",
|
|
179
|
+
"core.password.strength": "密碼強度",
|
|
180
|
+
"core.password.strength.empty": "未輸入",
|
|
181
|
+
"core.password.strength.high": "高",
|
|
182
|
+
"core.password.strength.low": "低",
|
|
183
|
+
"core.password.strength.medium": "中",
|
|
184
|
+
"core.password.tip": "需同時包含大小寫字母、數字、特殊字元,且長度不少於 8 位,達到最高強度後才可提交。",
|
|
185
|
+
"core.theme.accordion": "選單手風琴",
|
|
186
|
+
"core.theme.asideInverted": "側邊欄反轉色",
|
|
187
|
+
"core.theme.asideInvertedTip": "側邊欄顏色變為深色模式",
|
|
188
|
+
"core.theme.breadcrumb": "麵包屑",
|
|
189
|
+
"core.theme.breadcrumbIcon": "麵包屑圖示",
|
|
190
|
+
"core.theme.color": "主題顏色",
|
|
191
|
+
"core.theme.dark": "暗黑模式",
|
|
192
|
+
"core.theme.footer": "頁尾",
|
|
193
|
+
"core.theme.global": "全域性主題",
|
|
194
|
+
"core.theme.grey": "灰色模式",
|
|
195
|
+
"core.theme.headerInverted": "頭部反轉色",
|
|
196
|
+
"core.theme.headerInvertedTip": "頭部顏色變為深色模式",
|
|
197
|
+
"core.theme.interface": "介面設定",
|
|
198
|
+
"core.theme.layout": "佈局樣式",
|
|
199
|
+
"core.theme.layout.classic": "經典",
|
|
200
|
+
"core.theme.layout.columns": "分欄",
|
|
201
|
+
"core.theme.layout.transverse": "橫向",
|
|
202
|
+
"core.theme.layout.vertical": "縱向",
|
|
203
|
+
"core.theme.menuCollapse": "選單摺疊",
|
|
204
|
+
"core.theme.primaryReset": "主題顏色已重置為 {color}",
|
|
205
|
+
"core.theme.settings": "佈局設定",
|
|
206
|
+
"core.theme.tabs": "標籤欄",
|
|
207
|
+
"core.theme.tabsIcon": "標籤欄圖示",
|
|
208
|
+
"core.theme.watermark": "水印",
|
|
209
|
+
"core.theme.weak": "色弱模式",
|
|
210
|
+
"core.theme.colorHexInvalid": "請輸入正確的十六進位制顏色值",
|
|
211
|
+
"core.theme.colorRgbInvalid": "請輸入正確的 RGB 顏色值",
|
|
212
|
+
"core.route.forbidden": "403 頁面",
|
|
213
|
+
"core.route.login": "登入",
|
|
214
|
+
"core.route.notFound": "404 頁面",
|
|
215
|
+
"core.route.serverError": "500 頁面",
|
|
216
|
+
"core.tabs.closeAll": "關閉全部",
|
|
217
|
+
"core.tabs.closeCurrent": "關閉當前",
|
|
218
|
+
"core.tabs.closeLeft": "關閉左側",
|
|
219
|
+
"core.tabs.closeOther": "關閉其他",
|
|
220
|
+
"core.tabs.closeRight": "關閉右側",
|
|
221
|
+
"core.tabs.maximize": "最大化",
|
|
222
|
+
"core.tabs.refresh": "重新整理當前",
|
|
223
|
+
"core.table.collapseAll": "摺疊全部",
|
|
224
|
+
"core.table.columnName": "列名",
|
|
225
|
+
"core.table.columnSetting": "列設定",
|
|
226
|
+
"core.table.expandAll": "展開全部",
|
|
227
|
+
"core.table.hideSearch": "隱藏搜尋",
|
|
228
|
+
"core.table.noConfigurableColumns": "暫無可配置列",
|
|
229
|
+
"core.table.refresh": "重新整理資料",
|
|
230
|
+
"core.table.show": "顯示",
|
|
231
|
+
"core.table.showSearch": "顯示搜尋",
|
|
232
|
+
"core.table.sort": "排序",
|
|
233
|
+
"core.tree.filterPlaceholder": "輸入關鍵字進行過濾",
|
|
234
|
+
"core.tree.resetSelection": "重置選擇",
|
|
235
|
+
"core.upload.action": "上傳檔案",
|
|
236
|
+
"core.upload.batchAdd": "批次新增{resource}",
|
|
237
|
+
"core.upload.batchFailed": "批次新增{resource}失敗,請重新上傳",
|
|
238
|
+
"core.upload.batchSuccess": "批次新增{resource}成功",
|
|
239
|
+
"core.upload.click": "點選上傳",
|
|
240
|
+
"core.upload.dataCover": "資料覆蓋",
|
|
241
|
+
"core.upload.dragOrClick": "將檔案拖到此處,或",
|
|
242
|
+
"core.upload.excelFormat": "請上傳 .xls、.xlsx 標準格式檔案,檔案最大為 {size} MB",
|
|
243
|
+
"core.upload.file": "檔案上傳",
|
|
244
|
+
"core.upload.fileFailed": "檔案上傳失敗,請重新上傳",
|
|
245
|
+
"core.upload.fileFormatInvalid": "上傳檔案不符合所需的格式",
|
|
246
|
+
"core.upload.fileSizeExceeded": "上傳檔案大小不能超過 {size} MB",
|
|
247
|
+
"core.upload.fileSuccess": "檔案上傳成功",
|
|
248
|
+
"core.upload.imageFailed": "圖片上傳失敗,請重新上傳",
|
|
249
|
+
"core.upload.imageFormatInvalid": "上傳圖片不符合所需的格式",
|
|
250
|
+
"core.upload.imageLimitExceeded": "當前最多隻能上傳 {limit} 張圖片,請移除後上傳",
|
|
251
|
+
"core.upload.imageSizeExceeded": "上傳圖片大小不能超過 {size} MB",
|
|
252
|
+
"core.upload.imageSuccess": "圖片上傳成功",
|
|
253
|
+
"core.upload.limitExceeded": "當前最多隻能上傳 {limit} 個檔案,請移除後上傳",
|
|
254
|
+
"core.upload.singleFileOnly": "最多隻能上傳一個檔案",
|
|
255
|
+
"core.upload.template": "{resource}模板",
|
|
256
|
+
"core.upload.templateDownload": "模板下載",
|
|
257
|
+
"core.upload.unnamedFile": "未命名檔案"
|
|
258
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Component } from "vue";
|
|
2
2
|
import type { RouteLocationNormalizedLoaded } from "vue-router";
|
|
3
|
+
import type { LocaleMessages, SupportedLocale } from "../locales";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* 管理端视图加载器。
|
|
@@ -42,8 +43,10 @@ export interface AdminHeaderTool {
|
|
|
42
43
|
export interface AdminUserMenuAction {
|
|
43
44
|
/** 操作唯一名称。 */
|
|
44
45
|
name: string;
|
|
45
|
-
/**
|
|
46
|
-
|
|
46
|
+
/** 操作显示名称对应的稳定语言键。 */
|
|
47
|
+
labelKey?: string;
|
|
48
|
+
/** 兼容未迁移模块的静态显示名称。 */
|
|
49
|
+
label?: string;
|
|
47
50
|
/** 对应后端动态菜单名称,菜单不存在时不显示操作。 */
|
|
48
51
|
menuName: string;
|
|
49
52
|
/** 操作图标。 */
|
|
@@ -74,6 +77,8 @@ export interface AdminModule {
|
|
|
74
77
|
routeOptions?: Record<string, AdminRouteOptions>;
|
|
75
78
|
/** 模块提供的命名扩展,由扩展所属业务包定义具体类型。 */
|
|
76
79
|
extensions?: Record<string, unknown>;
|
|
80
|
+
/** 模块按语言区域贡献的扁平语言包。 */
|
|
81
|
+
messages?: Partial<Record<SupportedLocale, LocaleMessages>>;
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
const registeredModules = new Map<string, AdminModule>();
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { ADMIN_STATIC_VIEWS, defineAdminModule, type AdminStaticViewModules } from "./index";
|
|
2
2
|
|
|
3
|
+
// 语言包由 core 模块注册,供管理端公共组件、登录页和错误处理使用。
|
|
4
|
+
import enUS from "../locales/en-US.json";
|
|
5
|
+
import jaJP from "../locales/ja-JP.json";
|
|
6
|
+
import zhCN from "../locales/zh-CN.json";
|
|
7
|
+
import zhTW from "../locales/zh-TW.json";
|
|
8
|
+
import koKR from "../locales/ko-KR.json";
|
|
9
|
+
import frFR from "../locales/fr-FR.json";
|
|
10
|
+
import esES from "../locales/es-ES.json";
|
|
11
|
+
|
|
3
12
|
const staticViewModules: AdminStaticViewModules = {
|
|
4
13
|
[ADMIN_STATIC_VIEWS.LOGIN]: () => import("../views/login/index.vue"),
|
|
5
14
|
[ADMIN_STATIC_VIEWS.FORBIDDEN]: () => import("../views/error/403.vue"),
|
|
@@ -13,5 +22,14 @@ const staticViewModules: AdminStaticViewModules = {
|
|
|
13
22
|
*/
|
|
14
23
|
export const kratosAdminModule = defineAdminModule({
|
|
15
24
|
name: "kratos-admin",
|
|
16
|
-
staticViews: staticViewModules
|
|
25
|
+
staticViews: staticViewModules,
|
|
26
|
+
messages: {
|
|
27
|
+
"zh-CN": zhCN,
|
|
28
|
+
"zh-TW": zhTW,
|
|
29
|
+
"ko-KR": koKR,
|
|
30
|
+
"fr-FR": frFR,
|
|
31
|
+
"es-ES": esES,
|
|
32
|
+
"en-US": enUS,
|
|
33
|
+
"ja-JP": jaJP
|
|
34
|
+
}
|
|
17
35
|
});
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
export { default } from "./utils/request";
|
|
2
|
-
export {
|
|
2
|
+
export {
|
|
3
|
+
ensureAccessToken,
|
|
4
|
+
getRequestAccessToken,
|
|
5
|
+
handleAuthExpired,
|
|
6
|
+
hasValidAccessToken,
|
|
7
|
+
requestBaseURL
|
|
8
|
+
} from "./utils/request";
|
|
9
|
+
export { getLocaleRequestHeaders } from "./locales";
|
|
@@ -6,6 +6,7 @@ import { staticRouter, errorRouter } from "../routers/modules/staticRouter";
|
|
|
6
6
|
import NProgress from "../config/nprogress";
|
|
7
7
|
import { isUnmatchedRoute } from "../utils/router";
|
|
8
8
|
import { ensureAccessToken } from "../utils/request";
|
|
9
|
+
import { t } from "../locales";
|
|
9
10
|
|
|
10
11
|
const mode = import.meta.env.VITE_ROUTER_MODE;
|
|
11
12
|
|
|
@@ -48,7 +49,9 @@ router.beforeEach(async to => {
|
|
|
48
49
|
|
|
49
50
|
// 2.动态设置标题
|
|
50
51
|
const title = import.meta.env.VITE_GLOB_APP_TITLE;
|
|
51
|
-
|
|
52
|
+
const titleKey = typeof to.meta.titleKey === "string" ? to.meta.titleKey : "";
|
|
53
|
+
const routeTitle = titleKey ? t(titleKey) : String(to.meta.title ?? "");
|
|
54
|
+
document.title = routeTitle ? `${routeTitle} - ${title}` : title;
|
|
52
55
|
|
|
53
56
|
const hasAccessToken = await ensureAccessToken();
|
|
54
57
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import router from "../../routers/index";
|
|
2
2
|
import { LOGIN_URL } from "../../config";
|
|
3
|
+
import { t } from "../../locales";
|
|
3
4
|
import { RouteRecordRaw } from "vue-router";
|
|
4
5
|
import { ElNotification } from "element-plus";
|
|
5
6
|
import { useUserStore } from "../../stores/modules/user";
|
|
@@ -121,8 +122,8 @@ export const initDynamicRouter = async () => {
|
|
|
121
122
|
// 2.判断当前用户有没有菜单权限
|
|
122
123
|
if (!authStore.authMenuListGet.length) {
|
|
123
124
|
ElNotification({
|
|
124
|
-
title: "
|
|
125
|
-
message: "
|
|
125
|
+
title: t("core.auth.noPermission"),
|
|
126
|
+
message: t("core.auth.noMenuPermission"),
|
|
126
127
|
type: "warning",
|
|
127
128
|
duration: 3000
|
|
128
129
|
});
|
|
@@ -24,7 +24,8 @@ export const staticRouter: RouteRecordRaw[] = [
|
|
|
24
24
|
name: "Login",
|
|
25
25
|
component: createAdminStaticViewLoader(ADMIN_STATIC_VIEWS.LOGIN),
|
|
26
26
|
meta: {
|
|
27
|
-
title: "
|
|
27
|
+
title: "",
|
|
28
|
+
titleKey: "core.route.login"
|
|
28
29
|
}
|
|
29
30
|
},
|
|
30
31
|
{
|
|
@@ -46,7 +47,8 @@ export const errorRouter = [
|
|
|
46
47
|
name: "403",
|
|
47
48
|
component: createAdminStaticViewLoader(ADMIN_STATIC_VIEWS.FORBIDDEN),
|
|
48
49
|
meta: {
|
|
49
|
-
title: "
|
|
50
|
+
title: "",
|
|
51
|
+
titleKey: "core.route.forbidden"
|
|
50
52
|
}
|
|
51
53
|
},
|
|
52
54
|
{
|
|
@@ -54,7 +56,8 @@ export const errorRouter = [
|
|
|
54
56
|
name: "404",
|
|
55
57
|
component: createAdminStaticViewLoader(ADMIN_STATIC_VIEWS.NOT_FOUND),
|
|
56
58
|
meta: {
|
|
57
|
-
title: "
|
|
59
|
+
title: "",
|
|
60
|
+
titleKey: "core.route.notFound"
|
|
58
61
|
}
|
|
59
62
|
},
|
|
60
63
|
{
|
|
@@ -62,7 +65,8 @@ export const errorRouter = [
|
|
|
62
65
|
name: "500",
|
|
63
66
|
component: createAdminStaticViewLoader(ADMIN_STATIC_VIEWS.SERVER_ERROR),
|
|
64
67
|
meta: {
|
|
65
|
-
title: "
|
|
68
|
+
title: "",
|
|
69
|
+
titleKey: "core.route.serverError"
|
|
66
70
|
}
|
|
67
71
|
},
|
|
68
72
|
// Resolve refresh page, route warnings
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.8
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: base/v1/language.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
|
|
9
|
+
/** 查询语言请求参数。 */
|
|
10
|
+
export interface GetLanguageRequest {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** 支持的语言。 */
|
|
14
|
+
export interface LanguageItem {
|
|
15
|
+
/** 标准语言代码 */
|
|
16
|
+
language_code: string;
|
|
17
|
+
/** 语言名称 */
|
|
18
|
+
language_name: string;
|
|
19
|
+
/** 本地语言名称 */
|
|
20
|
+
native_name: string;
|
|
21
|
+
/** 排序,值越小越靠前 */
|
|
22
|
+
sort: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** 当前支持的语言查询结果。 */
|
|
26
|
+
export interface GetLanguageResponse {
|
|
27
|
+
/** 当前支持的语言列表 */
|
|
28
|
+
languages: LanguageItem[];
|
|
29
|
+
/** 主语言代码 */
|
|
30
|
+
primary_language_code: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** 语言公共服务。 */
|
|
34
|
+
export interface LanguageService {
|
|
35
|
+
/** 查询当前支持的语言和主语言。 */
|
|
36
|
+
GetLanguage(request: GetLanguageRequest): Promise<GetLanguageResponse>;
|
|
37
|
+
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import type { Status } from "../../../common/v1/enum";
|
|
9
9
|
import type { Empty } from "../../../google/protobuf/empty";
|
|
10
|
+
import type { TranslationStatus } from "./base_translation";
|
|
10
11
|
|
|
11
12
|
/** 字典选项查询条件 */
|
|
12
13
|
export interface OptionBaseDictRequest {
|
|
@@ -100,6 +101,8 @@ export interface BaseDictForm {
|
|
|
100
101
|
code: string;
|
|
101
102
|
/** 字典名称 */
|
|
102
103
|
name: string;
|
|
104
|
+
/** 非主语言翻译 */
|
|
105
|
+
translations: BaseDictTranslation[];
|
|
103
106
|
/** 状态 */
|
|
104
107
|
status: Status;
|
|
105
108
|
}
|
|
@@ -124,6 +127,8 @@ export interface BaseDictItemForm {
|
|
|
124
127
|
tag_type: string;
|
|
125
128
|
/** 排序 */
|
|
126
129
|
sort: number;
|
|
130
|
+
/** 非主语言翻译 */
|
|
131
|
+
translations: BaseDictItemTranslation[];
|
|
127
132
|
/** 状态 */
|
|
128
133
|
status: Status;
|
|
129
134
|
}
|
|
@@ -188,6 +193,8 @@ export interface BaseDict {
|
|
|
188
193
|
code: string;
|
|
189
194
|
/** 字典名称 */
|
|
190
195
|
name: string;
|
|
196
|
+
/** 非主语言翻译 */
|
|
197
|
+
translations: BaseDictTranslation[];
|
|
191
198
|
/** 状态 */
|
|
192
199
|
status: Status;
|
|
193
200
|
/** 创建时间 */
|
|
@@ -210,6 +217,8 @@ export interface BaseDictItem {
|
|
|
210
217
|
tag_type: string;
|
|
211
218
|
/** 排序 */
|
|
212
219
|
sort: number;
|
|
220
|
+
/** 非主语言翻译 */
|
|
221
|
+
translations: BaseDictItemTranslation[];
|
|
213
222
|
/** 状态 */
|
|
214
223
|
status: Status;
|
|
215
224
|
/** 创建时间 */
|
|
@@ -218,6 +227,78 @@ export interface BaseDictItem {
|
|
|
218
227
|
updated_at: string;
|
|
219
228
|
}
|
|
220
229
|
|
|
230
|
+
/** 字典翻译 */
|
|
231
|
+
export interface BaseDictTranslation {
|
|
232
|
+
/** 主键ID */
|
|
233
|
+
id: number;
|
|
234
|
+
/** 字典ID */
|
|
235
|
+
dict_id: number;
|
|
236
|
+
/** 语言代码 */
|
|
237
|
+
locale: string;
|
|
238
|
+
/** 字典名称 */
|
|
239
|
+
name: string;
|
|
240
|
+
/** 翻译状态 */
|
|
241
|
+
translation_status: TranslationStatus;
|
|
242
|
+
/** 中文源文SHA-256 */
|
|
243
|
+
source_hash: string;
|
|
244
|
+
/** 机器翻译提供方 */
|
|
245
|
+
translation_provider: string;
|
|
246
|
+
/** 最近机器翻译时间 */
|
|
247
|
+
translated_at: string;
|
|
248
|
+
/** 审核人ID */
|
|
249
|
+
reviewed_by: number;
|
|
250
|
+
/** 审核时间 */
|
|
251
|
+
reviewed_at: string;
|
|
252
|
+
/** 创建人ID */
|
|
253
|
+
created_by: number;
|
|
254
|
+
/** 更新人ID */
|
|
255
|
+
updated_by: number;
|
|
256
|
+
/** 创建时间 */
|
|
257
|
+
created_at: string;
|
|
258
|
+
/** 更新时间 */
|
|
259
|
+
updated_at: string;
|
|
260
|
+
/** 删除时间 */
|
|
261
|
+
deleted_at: number;
|
|
262
|
+
/** 中文源文是否已变化 */
|
|
263
|
+
source_changed: boolean;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/** 字典项翻译 */
|
|
267
|
+
export interface BaseDictItemTranslation {
|
|
268
|
+
/** 主键ID */
|
|
269
|
+
id: number;
|
|
270
|
+
/** 字典项ID */
|
|
271
|
+
dict_item_id: number;
|
|
272
|
+
/** 语言代码 */
|
|
273
|
+
locale: string;
|
|
274
|
+
/** 字典项标签 */
|
|
275
|
+
label: string;
|
|
276
|
+
/** 翻译状态 */
|
|
277
|
+
translation_status: TranslationStatus;
|
|
278
|
+
/** 中文源文SHA-256 */
|
|
279
|
+
source_hash: string;
|
|
280
|
+
/** 机器翻译提供方 */
|
|
281
|
+
translation_provider: string;
|
|
282
|
+
/** 最近机器翻译时间 */
|
|
283
|
+
translated_at: string;
|
|
284
|
+
/** 审核人ID */
|
|
285
|
+
reviewed_by: number;
|
|
286
|
+
/** 审核时间 */
|
|
287
|
+
reviewed_at: string;
|
|
288
|
+
/** 创建人ID */
|
|
289
|
+
created_by: number;
|
|
290
|
+
/** 更新人ID */
|
|
291
|
+
updated_by: number;
|
|
292
|
+
/** 创建时间 */
|
|
293
|
+
created_at: string;
|
|
294
|
+
/** 更新时间 */
|
|
295
|
+
updated_at: string;
|
|
296
|
+
/** 删除时间 */
|
|
297
|
+
deleted_at: number;
|
|
298
|
+
/** 中文源文是否已变化 */
|
|
299
|
+
source_changed: boolean;
|
|
300
|
+
}
|
|
301
|
+
|
|
221
302
|
/** Admin字典服务 */
|
|
222
303
|
export interface BaseDictService {
|
|
223
304
|
/** 查询字典列表 */
|