feat(router): 优化 Agent路由加载策略

- 移除静态路由中的占位组件- 删除动态路由加载逻辑
- 在路由守卫中实现 Agent路由的动态加载
- 更新路由元信息和结构
This commit is contained in:
林志军
2025-07-25 10:51:04 +08:00
parent 9fa28c76cc
commit 149831ebc9
4 changed files with 76 additions and 74 deletions

View File

@ -4,31 +4,12 @@ import { MENU_GROUP_IDS } from '@/router/constants';
import IconRepository from '@/assets/svg/icon-repository.svg';
const COMPONENTS: AppRouteRecordRaw[] = [
// {
// path: '/agent',
// name: 'Agent',
// redirect: 'agent/index',
// meta: {
// locale: '扣子智能体',
// icon: IconRepository,
// requiresAuth: true,
// requireLogin: true,
// roles: ['*'],
// id: MENU_GROUP_IDS.AGENT,
// },
// children: [
// {
// path: 'index',
// name: 'AgentIndex',
// component: () => import('@/views/agent/index'),
// meta: {
// requiresAuth: false,
// requireLogin: true,
// },
// }
//
// ],
// },
{
path: '/agent',
name: 'AgentPlaceholder',
component: () => Promise.resolve({ template: '<router-view />' }), // 占位组件
},
];
export default COMPONENTS;