mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-04-03 09:33:22 +08:00
refactor(antdv-next): 将message组件调用统一改为window.message
将项目中直接导入的antdv-next的message组件调用改为通过window.message调用,提升代码一致性 移除不再需要的message组件导入 新增api-switch组件用于统一处理状态切换逻辑
This commit is contained in:
@@ -10,7 +10,6 @@ import type { Menu } from '#/api';
|
||||
import { generateAccessible } from '@vben/access';
|
||||
import { preferences } from '@vben/preferences';
|
||||
|
||||
import { message } from 'antdv-next';
|
||||
import { cloneDeep } from 'lodash-es';
|
||||
|
||||
import { getAllMenusApi } from '#/api';
|
||||
@@ -241,8 +240,8 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
|
||||
...options,
|
||||
fetchMenuListAsync: async () => {
|
||||
// 清除以前的message
|
||||
message.destroy();
|
||||
message.loading({
|
||||
window.message.destroy();
|
||||
window.message.loading({
|
||||
content: `${$t('common.loadingMenu')}...`,
|
||||
duration: 1,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user