diff --git a/src/lang/zh.ts b/src/lang/zh.ts index 1b58d81..1b3610f 100644 --- a/src/lang/zh.ts +++ b/src/lang/zh.ts @@ -65,7 +65,7 @@ export default { i18n: '国际化', externalLink: '外链', profile: '个人中心', - article: '文章管理' + article: '资讯管理' }, navbar: { logOut: '退出登录', diff --git a/src/router/index.ts b/src/router/index.ts index 1a77e74..94cfc42 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -7,6 +7,7 @@ import Layout from '@/layout/index.vue' /* Router modules */ import tableRouter from './modules/table' import systemRoutes from '@/router/modules/system' +import articleRouters from '@/router/modules/articlue' Vue.use(VueRouter) @@ -114,47 +115,7 @@ export const constantRoutes: RouteConfig[] = [ */ export const asyncRoutes: RouteConfig[] = [ systemRoutes, - { - path: '/article', - component: Layout, - redirect: '/article/list', - meta: { - title: 'article', - icon: 'list', - alwaysShow: true - }, - children: [ - { - path: 'create', - component: () => import(/* webpackChunkName: "example-create" */ '@/views/article/create.vue'), - name: 'CreateArticle', - meta: { - title: 'createArticle', - icon: 'edit' - } - }, - { - path: 'edit/:id(\\d+)', - component: () => import(/* webpackChunkName: "example-edit" */ '@/views/article/edit.vue'), - name: 'EditArticle', - meta: { - title: 'editArticle', - noCache: true, - activeMenu: '/article/list', - hidden: true - } - }, - { - path: 'list', - component: () => import(/* webpackChunkName: "example-list" */ '@/views/article/list.vue'), - name: 'ArticleList', - meta: { - title: 'articleList', - icon: 'list' - } - } - ] - }, + articleRouters, { path: '/error-log', component: Layout, diff --git a/src/router/modules/articlue.ts b/src/router/modules/articlue.ts new file mode 100644 index 0000000..d1b236a --- /dev/null +++ b/src/router/modules/articlue.ts @@ -0,0 +1,46 @@ +import { RouteConfig } from 'vue-router' +import Layout from '@/layout/index.vue' + +const articleRouters: RouteConfig = { + path: '/article', + component: Layout, + redirect: '/article/list', + meta: { + title: 'article', + icon: 'list', + alwaysShow: true + }, + children: [ + { + path: 'create', + component: () => import(/* webpackChunkName: "example-create" */ '@/views/article/create.vue'), + name: 'CreateArticle', + meta: { + title: 'createArticle', + icon: 'edit' + } + }, + { + path: 'edit/:id(\\d+)', + component: () => import(/* webpackChunkName: "example-edit" */ '@/views/article/edit.vue'), + name: 'EditArticle', + meta: { + title: 'editArticle', + noCache: true, + activeMenu: '/article/list', + hidden: true + } + }, + { + path: 'list', + component: () => import(/* webpackChunkName: "example-list" */ '@/views/article/list.vue'), + name: 'ArticleList', + meta: { + title: 'articleList', + icon: 'list' + } + } + ] +} + +export default articleRouters