optimize: ♻️ 邮件模板配置枚举字段获取(待完成)
This commit is contained in:
parent
269a71532f
commit
ded5239925
|
@ -75,11 +75,6 @@ export const message = (message: string | VNode | (() => VNode), params?: Messag
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 关闭所有 `Message` 消息提示函数
|
||||
*/
|
||||
export const closeAllMessage = (): void => ElMessage.closeAll();
|
||||
|
||||
/**
|
||||
* 仓库消息展示
|
||||
* @param result
|
||||
|
|
|
@ -13,6 +13,7 @@ import globalization from '@/assets/svg/globalization.svg?component';
|
|||
import Check from '@iconify-icons/ep/check';
|
||||
|
||||
import LoginForm from '@/views/login/login-form.vue';
|
||||
import { userI18nTypeStore } from '@/store/i18n/i18nType';
|
||||
|
||||
defineOptions({
|
||||
name: 'Login',
|
||||
|
@ -24,7 +25,8 @@ initStorage();
|
|||
const { dataTheme, overallStyle, dataThemeChange } = useDataThemeChange();
|
||||
dataThemeChange(overallStyle.value);
|
||||
const { title, getDropdownItemStyle, getDropdownItemClass } = useNav();
|
||||
const { locale, translationCh, translationEn } = useTranslationLang();
|
||||
const { locale, translation } = useTranslationLang();
|
||||
const i18nTypeStore = userI18nTypeStore();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -39,15 +41,17 @@ const { locale, translationCh, translationEn } = useTranslationLang();
|
|||
<globalization class="hover:text-primary hover:!bg-[transparent] w-[20px] h-[20px] ml-1.5 cursor-pointer outline-none duration-300" />
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu class="translation">
|
||||
<el-dropdown-item :class="['dark:!text-white', getDropdownItemClass(locale, 'zh')]" :style="getDropdownItemStyle(locale, 'zh')" @click="translationCh">
|
||||
<IconifyIconOffline v-show="locale === 'zh'" :icon="Check" class="check-zh" />
|
||||
简体中文
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :class="['dark:!text-white', getDropdownItemClass(locale, 'en')]" :style="getDropdownItemStyle(locale, 'en')" @click="translationEn">
|
||||
<span v-show="locale === 'en'" class="check-en">
|
||||
<el-dropdown-item
|
||||
v-for="item in i18nTypeStore.translationTypeList"
|
||||
:key="item.key"
|
||||
:class="['dark:!text-white', getDropdownItemClass(locale, item.key)]"
|
||||
:style="getDropdownItemStyle(locale, item.key)"
|
||||
@click="translation(item.key)"
|
||||
>
|
||||
<span v-show="locale === item.key" class="check">
|
||||
<IconifyIconOffline :icon="Check" />
|
||||
</span>
|
||||
English
|
||||
{{ item.value }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
|
|
|
@ -10,7 +10,7 @@ import { useUserStore } from '@/store/system/user';
|
|||
import { message } from '@/utils/message';
|
||||
import { getTopMenu, initRouter } from '@/router/utils';
|
||||
import Motion from './utils/motion';
|
||||
import type { FormInstance } from 'element-plus';
|
||||
import { ElMessage, FormInstance } from 'element-plus';
|
||||
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
|
@ -76,6 +76,7 @@ const onLogin = async (formEl: FormInstance | undefined) => {
|
|||
// 获取后端路由
|
||||
await initRouter();
|
||||
router.push(getTopMenu(true).path).then(() => {
|
||||
ElMessage.closeAll();
|
||||
message(t('login.loginSuccess'), { type: 'success' });
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue