mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 精简版+动态路由权限初步
This commit is contained in:
@ -1,50 +0,0 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import { BasicLayout } from '@/layouts';
|
||||
import { ComponentButton, ComponentCard, ComponentTable } from '@/views';
|
||||
import { routeName, routePath, routeTitle } from '../constant';
|
||||
|
||||
const component: RouteRecordRaw = {
|
||||
name: routeName('component'),
|
||||
path: routePath('component'),
|
||||
component: BasicLayout,
|
||||
redirect: { name: routeName('component_button') },
|
||||
meta: {
|
||||
title: routeTitle('component'),
|
||||
icon: 'fluent:app-store-24-regular',
|
||||
order: 4
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: routeName('component_button'),
|
||||
path: routePath('component_button'),
|
||||
component: ComponentButton,
|
||||
meta: {
|
||||
title: routeTitle('component_button'),
|
||||
requiresAuth: true,
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
name: routeName('component_card'),
|
||||
path: routePath('component_card'),
|
||||
component: ComponentCard,
|
||||
meta: {
|
||||
title: routeTitle('component_card'),
|
||||
requiresAuth: true,
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
name: routeName('component_table'),
|
||||
path: routePath('component_table'),
|
||||
component: ComponentTable,
|
||||
meta: {
|
||||
title: routeTitle('component_table'),
|
||||
requiresAuth: true,
|
||||
keepAlive: true
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default component;
|
Reference in New Issue
Block a user