route.js 924 B

12345678910111213141516171819202122232425262728
  1. // 静态路由配置
  2. // 书写格式与动态路由格式一致,全部经由框架统一转换
  3. // 比较动态路由在meta中多加入了role角色权限,为数组类型。一个菜单是否有权限显示,取决于它以及后代菜单是否有权限。
  4. // routes 显示在左侧菜单中的路由(显示顺序在动态路由之前)
  5. // 示例如下
  6. const routes = [
  7. {
  8. name: "device",
  9. path: "/device",
  10. meta: { title: "在线设备", icon: "ant-design:code-sandbox-outlined", affix: true },
  11. component: "device"
  12. },
  13. {
  14. name: "group",
  15. path: "/group",
  16. meta: { title: "组控识别", icon: "clarity:organization-line" },
  17. component: "group"
  18. },
  19. {
  20. name: "record",
  21. path: "/record",
  22. meta: { title: "识别记录", icon: "ant-design:reconciliation-outlined" },
  23. component: "record"
  24. }
  25. ]
  26. export default routes;