mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-08 07:31:09 +08:00
fix: 修复通知组件引用从直接导入改为window对象
避免在未正确初始化antdv-next时使用notification导致运行时错误
This commit is contained in:
@@ -8,7 +8,6 @@ import { LOGIN_PATH } from '@vben/constants';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { resetAllStores, useAccessStore, useUserStore } from '@vben/stores';
|
||||
|
||||
import { notification } from 'antdv-next';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
import { doLogout, getUserInfoApi, loginApi, seeConnectionClose } from '#/api';
|
||||
@@ -66,7 +65,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
}
|
||||
|
||||
if (userInfo?.realName) {
|
||||
notification.success({
|
||||
window.notification.success({
|
||||
description: `${$t('authentication.loginSuccessDesc')}:${userInfo?.realName}`,
|
||||
duration: 3,
|
||||
title: $t('authentication.loginSuccess'),
|
||||
|
||||
@@ -7,7 +7,6 @@ import { $t } from '@vben/locales';
|
||||
import { useUserStore } from '@vben/stores';
|
||||
import { buildUUID } from '@vben/utils';
|
||||
|
||||
import { notification } from 'antdv-next';
|
||||
import dayjs from 'dayjs';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
@@ -53,7 +52,7 @@ export const useNotifyStore = defineStore(
|
||||
if (!message) return;
|
||||
console.log(`接收到消息: ${message}`);
|
||||
|
||||
notification.success({
|
||||
window.notification.success({
|
||||
description: message,
|
||||
duration: 3,
|
||||
title: $t('component.notice.received'),
|
||||
|
||||
Reference in New Issue
Block a user