refactor(antdv-next): 将message组件调用统一改为window.message

将项目中直接导入的antdv-next的message组件调用改为通过window.message调用,提升代码一致性
移除不再需要的message组件导入
新增api-switch组件用于统一处理状态切换逻辑
This commit is contained in:
dap
2026-01-15 09:35:54 +08:00
parent 2312f438ac
commit ee1b37c787
23 changed files with 211 additions and 90 deletions

View File

@@ -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,
});