mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): new i18n function $t & login page and setting drawer config i18n
This commit is contained in:
@ -4,6 +4,7 @@ import { router } from '@/router';
|
||||
import { fetchLogin, fetchUserInfo } from '@/service';
|
||||
import { useRouterPush } from '@/composables';
|
||||
import { localStg } from '@/utils';
|
||||
import { $t } from '@/locales';
|
||||
import { useTabStore } from '../tab';
|
||||
import { useRouteStore } from '../route';
|
||||
import { getToken, getUserInfo, clearAuthStorage } from './helpers';
|
||||
@ -68,8 +69,8 @@ export const useAuthStore = defineStore('auth-store', {
|
||||
// 登录成功弹出欢迎提示
|
||||
if (route.isInitAuthRoute) {
|
||||
window.$notification?.success({
|
||||
title: '登录成功!',
|
||||
content: `欢迎回来,${this.userInfo.userName}!`,
|
||||
title: $t('page.login.common.loginSuccess'),
|
||||
content: $t('page.login.common.welcomeBack', { userName: this.userInfo.userName }),
|
||||
duration: 3000
|
||||
});
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ export const useTabStore = defineStore('tab-store', {
|
||||
const item = this.tabs.find(tab => tab.fullPath === this.activeTab);
|
||||
if (item) {
|
||||
if (item.meta.i18nTitle) {
|
||||
item.meta.i18nTitle = title;
|
||||
item.meta.i18nTitle = title as I18nType.I18nKey;
|
||||
} else {
|
||||
item.meta.title = title;
|
||||
}
|
||||
|
Reference in New Issue
Block a user