接触vben-admin已经一段时间了,一直记不住vben-adimn的路由配置项,记录一下:
import type { AppRouteModule } from '/@/router/types';
import { LAYOUT } from '/@/router/constant';
const dashboard: AppRouteModule = {
path: '/study', //主菜单路由
name: 'Study',
component: LAYOUT,
redirect: '/study/index', //重定向页面
meta: {
hideChildrenInMenu: false, //是否隐藏子菜单,默认(不写)为false
hideMenu: false, //是否隐藏该菜单,默认(不写)为false
icon: 'simple-icons:about-dot-me', //图标配置
title: '组件学习', //主菜单标题
orderNo: 100001, //路由编号,理由编号不能重复,重复则前者被后者覆盖
},
//子菜单
children: [
{
path: 'studyButtonPage',
name: 'StudyButtonPage',
component: () => import('/@/views/button/index.vue'), //路由跳转vue页面
meta: {
title: '按钮学习',
icon: 'simple-icons:about-dot-me',
},
},
{
path: 'studyIconPage',
name: 'StudyIconPage',
component: () => import('/@/views/icon/index.vue'),
meta: {
title: '图标组件',
icon: 'simple-icons:about-dot-me',
},
},
],
};
export default dashboard;