From 44614a803f78eeb3f21f3473d39bac01cf0bbd56 Mon Sep 17 00:00:00 2001 From: jmal Date: Sat, 14 Nov 2020 22:35:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Icon/Icon.vue | 2 +- src/components/ShowFile/ShowFile.vue | 6 +- src/layout/components/Navbar.vue | 24 +++- src/router/index.js | 3 +- src/views/markdown/index.vue | 123 ++++++++++++++---- src/views/setting/articles/articleManager.vue | 79 ++++++++++- 6 files changed, 195 insertions(+), 42 deletions(-) diff --git a/src/components/Icon/Icon.vue b/src/components/Icon/Icon.vue index e088ec1..65a3cd0 100644 --- a/src/components/Icon/Icon.vue +++ b/src/components/Icon/Icon.vue @@ -5,7 +5,7 @@ import { Icon } from 'ant-design-vue' const IconFont = Icon.createFromIconfontCN({ - scriptUrl: '//at.alicdn.com/t/font_2024484_7y6nutfxwm5.js' + scriptUrl: '//at.alicdn.com/t/font_2024484_50pffzulki7.js' }) export default { diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 7c022f3..267aca1 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -804,7 +804,7 @@ export default { this.$refs.fileListTable.clearSelection() } }) - + // 监听返回 if (window.history && window.history.pushState) { history.pushState(null, null, document.URL); window.addEventListener('popstate', this.goBack, false); @@ -1472,7 +1472,7 @@ export default { }, // 新建文档 newDocument() { - this.$router.push(`/markdown/editor`) + window.open(`/setting/website/manager-articles?operation=new`, "_blank"); }, newFolder() { this.newFolderName = this.getNewFileName(this.fileList, '新建文件夹') @@ -2300,7 +2300,7 @@ export default { break case 'edit': // 编辑 - this.$router.push(`/markdown/editor?id=${this.rowContextData.id}`) + this.$router.push(`/setting/website/manager-articles?operation=editor&id=${this.rowContextData.id}`) break case 'open': // 打开 diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 8a5c6b4..e8754d4 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -4,7 +4,10 @@
- +
+ + 网站 +
{{username}}
@@ -190,7 +193,22 @@ export default { line-height: 50px; } } -.el-dropdown-menu__item svg { - margin-right: 5px; + +.right-content-button { + line-height: 50px; + margin-right: 10px; + padding: 0 10px; + &:hover { + background-color: #00000006; + } + svg { + margin-right: 5px; + } +} + +.el-dropdown-menu__item { + svg { + margin-right: 5px; + } } diff --git a/src/router/index.js b/src/router/index.js index 0bc67ef..410f7a8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -194,6 +194,7 @@ export const constantRoutes = [ { path: 'articles', component: Layout, + hidden: true, children: [ { path: `${document.location.protocol}//${window.location.host}/articles`, @@ -229,7 +230,7 @@ export const constantRoutes = [ path: '/setting/website', component: Layout, name: 'website', - meta: { title: '网站管理', icon: 'wangzhan'}, + meta: { title: '网站管理', icon: 'wangzhanguanli'}, children: [ { path: 'manager-articles', diff --git a/src/views/markdown/index.vue b/src/views/markdown/index.vue index 3c08b21..6d1b189 100644 --- a/src/views/markdown/index.vue +++ b/src/views/markdown/index.vue @@ -1,5 +1,5 @@