| 1234567891011121314151617181920212223242526 |
- import { createRouter, createWebHistory } from 'vue-router'
- import { staticRoutes } from './constantRoutes'
- //缺陷:由于接口设计缺陷 menulist 返回不是一个类似的 路由信息 需要子级构造 多参数前端写死 @/stroe/permission
- // hidden: true,// 侧边栏隐藏
- // alwaysShow: false,//是否总是显示 (多用于控制目录只有一个菜单是否显示菜单) 目录属性
- // redirect: true,//在面包屑中是否可以点击
- // meta: {
- // title: 'title',
- // icon: 'Box',
- // cache:false, //是否缓存keepalive
- // affix: true, //是否增加固定
- // breadcrumb: false //是否添加到面包屑
- // link:是否是链接 由于新建标签 显示故 暂时无作用
- // micro:true //底座必须加
- // },
- const router = createRouter({
- history: createWebHistory(),
- routes: staticRoutes,
- // 刷新时,滚动条位置还原
- scrollBehavior: () => ({ left: 0, top: 0 })
- })
- export default router
|