index.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * News 插件路由配置
  3. * 新闻资讯管理系统
  4. *
  5. * @author SixShop Team
  6. * @version 1.0.0
  7. */
  8. export default {
  9. // 路由配置 - 单个路由对象
  10. routes: {
  11. path: '/news',
  12. name: 'NewsModule',
  13. component: () => import('@/layout/index.vue'),
  14. redirect: '/news/index', // 添加默认重定向
  15. meta: {
  16. title: '新闻管理',
  17. icon: 'Document',
  18. permission: 'news',
  19. priority: 60, // 中等优先级
  20. version: '1.0.0',
  21. author: 'SixShop Team',
  22. description: '新闻资讯和内容管理系统'
  23. },
  24. children: [
  25. {
  26. path: 'index',
  27. name: 'NewsIndex',
  28. component: () => import('./views/index.vue'),
  29. meta: {
  30. title: '新闻管理',
  31. icon: 'Document',
  32. keepAlive: true // 启用页面缓存
  33. }
  34. },
  35. {
  36. path: 'article/create',
  37. name: 'NewsArticleCreate',
  38. component: () => import('./components/article/ArticleEdit.vue'),
  39. meta: {
  40. title: '新增文章',
  41. hidden: true // 隐藏在菜单中
  42. }
  43. },
  44. {
  45. path: 'article/edit/:id',
  46. name: 'NewsArticleEdit',
  47. component: () => import('./components/article/ArticleEdit.vue'),
  48. meta: {
  49. title: '编辑文章',
  50. hidden: true // 隐藏在菜单中
  51. }
  52. }
  53. ]
  54. },
  55. // 菜单配置 - 与路由对应
  56. menus: [
  57. {
  58. path: '/news',
  59. title: '新闻管理',
  60. icon: 'Document',
  61. permission: 'news',
  62. children: [
  63. {
  64. path: '/news/index',
  65. title: '新闻管理',
  66. icon: 'Document'
  67. }
  68. ]
  69. }
  70. ]
  71. }