feat(router): 优化 Agent路由加载策略
- 移除静态路由中的占位组件- 删除动态路由加载逻辑 - 在路由守卫中实现 Agent路由的动态加载 - 更新路由元信息和结构
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user