Lazy load startup element plus modules
This commit is contained in:
@@ -7,7 +7,6 @@ import { LOGIN_PATH } from '@vben/constants';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { resetAllStores, useAccessStore, useUserStore } from '@vben/stores';
|
||||
|
||||
import { ElNotification } from 'element-plus/es/components/notification/index';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
import { getAccessCodesApi, getUserInfoApi, loginApi, logoutApi } from '#/api';
|
||||
@@ -70,6 +69,9 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
}
|
||||
|
||||
if (userInfo?.realName) {
|
||||
const { ElNotification } = await import(
|
||||
'element-plus/es/components/notification/index'
|
||||
);
|
||||
ElNotification({
|
||||
message: `${$t('authentication.loginSuccessDesc')}:${userInfo?.realName}`,
|
||||
title: $t('authentication.loginSuccess'),
|
||||
|
||||
Reference in New Issue
Block a user