mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-06-29 03:12:12 +08:00
feat: UI i18n depends on router (#290)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
- UI: 增加本地缓存进行地址管理
|
||||
- worker: 增加 `FORWARD_ADDRESS_LIST` 全局邮件转发地址(等同于 `catch all`)
|
||||
- UI: 多语言使用路由进行切换
|
||||
|
||||
## v0.4.6
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ const i18n = createI18n({
|
||||
})
|
||||
|
||||
router.beforeEach((to, from) => {
|
||||
if (to.params.lang) {
|
||||
if (to.params.lang && ['en', 'zh'].includes(to.params.lang)) {
|
||||
i18n.global.locale.value = to.params.lang
|
||||
} else {
|
||||
i18n.global.locale.value = 'zh'
|
||||
|
||||
Reference in New Issue
Block a user