diff --git a/src/config/router.config.js b/src/config/router.config.js index 33c2aeec8..e91c63798 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -21,8 +21,8 @@ export const asyncRouterMap = [ { path: '/posts', name: 'Posts', + component: BlankLayout, redirect: '/posts/list', - component: PageView, meta: { title: '文章', icon: 'form' }, children: [ { @@ -33,10 +33,17 @@ export const asyncRouterMap = [ }, { path: '/posts/write', - name: 'PostEdit', + name: 'PostWrite', component: () => import('@/views/post/PostEdit'), meta: { title: '写文章', hiddenHeaderContent: false, keepAlive: false } }, + { + path: '/posts/edit', + name: 'PostEdit', + hidden: true, + component: () => import('@/views/post/PostEdit'), + meta: { title: '编辑文章', hiddenHeaderContent: false, keepAlive: false } + }, { path: '/categories', name: 'CategoryList', @@ -56,7 +63,7 @@ export const asyncRouterMap = [ { path: '/sheets', name: 'Sheets', - component: PageView, + component: BlankLayout, redirect: '/sheets/list', meta: { title: '页面', icon: 'read' }, children: [ @@ -68,10 +75,17 @@ export const asyncRouterMap = [ }, { path: '/sheets/write', - name: 'SheetEdit', + name: 'SheetWrite', component: () => import('@/views/sheet/SheetEdit'), meta: { title: '新建页面', hiddenHeaderContent: false, keepAlive: false } }, + { + path: '/sheets/edit', + name: 'SheetEdit', + hidden: true, + component: () => import('@/views/sheet/SheetEdit'), + meta: { title: '编辑页面', hiddenHeaderContent: false, keepAlive: false } + }, { path: '/sheets/links', name: 'LinkList', diff --git a/src/core/lazy_lib/components_use.js b/src/core/lazy_lib/components_use.js index ec86dc7df..9394ecef9 100644 --- a/src/core/lazy_lib/components_use.js +++ b/src/core/lazy_lib/components_use.js @@ -1,5 +1,6 @@ import Vue from 'vue' import { + Affix, Anchor, AutoComplete, Alert, @@ -54,6 +55,7 @@ import { Space } from 'ant-design-vue' +Vue.use(Affix) Vue.use(Anchor) Vue.use(AutoComplete) Vue.use(Alert) diff --git a/src/layouts/PageView.vue b/src/layouts/PageView.vue index 78b56708f..2ac2266c3 100644 --- a/src/layouts/PageView.vue +++ b/src/layouts/PageView.vue @@ -1,8 +1,33 @@