import RouteView from '@/layouts/RouteView'

export default [
  {
    path: '/articles',
    name: 'article',
    component: RouteView,
    meta: {
      title: '行业资讯',
      icon: 'font-size',
      permission: [ 'user' ]
    },
    redirect: '/articles/index',
    children: [
      {
        path: '/articles/index',
        name: 'ArticleIndex',
        component: () => import(/* webpackChunkName: "article" */ '@/views/article/Index'),
        meta: {
          title: '资讯列表',
          icon: 'unordered-list',
          permission: [ 'user' ]
        }
      },
      {
        path: '/articles/create',
        name: 'ArticleCreate',
        hidden: true,
        component: () => import(/* webpackChunkName: "article" */ '@/views/article/Create'),
        meta: {
          title: '新增资讯',
          permission: [ 'user' ],
          keepAlive: false
        }
      },
      {
        path: '/articles/:articleId(\\d+)',
        name: 'ArticleEdit',
        hidden: true,
        component: () => import(/* webpackChunkName: "article" */ '@/views/article/Create'),
        meta: {
          title: '编辑资讯',
          permission: [ 'user' ]
        }
      },
      {
        path: '/categories',
        name: 'CategoryIndex',
        component: () => import(/* webpackChunkName: "article" */ '@/views/article/Category'),
        meta: {
          title: '分类管理',
          icon: 'unordered-list',
          permission: [ 'user' ]
        }
      }
    ]
  }
]
