diff --git a/package.json b/package.json index 07ec196..bdb659d 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "v-contextmenu": "^2.9.0", "v-viewer": "^1.5.1", "vant": "2.5.0", + "vditor": "^3.6.1", "viewerjs": "^1.5.0", "vonic": "^1.1.3", "vue": "2.6.10", diff --git a/src/components/FileTree/DirTree.vue b/src/components/FileTree/DirTree.vue index d84e92e..8a3dea6 100644 --- a/src/components/FileTree/DirTree.vue +++ b/src/components/FileTree/DirTree.vue @@ -4,6 +4,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{username}}
-
- 设置 + 基本设置 + + + + + 网站管理 @@ -57,7 +32,7 @@ - 退出登录 + 退出登录
@@ -151,7 +126,6 @@ export default { .right-menu { float: right; height: 100%; - line-height: 50px; &:focus { outline: none; @@ -177,7 +151,7 @@ export default { .avatar-container { margin-right: 30px; - + cursor: pointer; .avatar-wrapper { margin-top: 5px; position: relative; @@ -190,7 +164,6 @@ export default { } .el-icon-caret-bottom { - cursor: pointer; position: absolute; right: -20px; top: 25px; @@ -198,8 +171,14 @@ export default { } } } + .avatar-container:hover { + background-color: #00000006; + } } } +/deep/ .user-dropdown { + top: 50px; +} /deep/ .el-menu--horizontal { padding: 0 15px; .el-menu-item { @@ -211,4 +190,7 @@ export default { line-height: 50px; } } +.el-dropdown-menu__item svg { + margin-right: 5px; +} diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index a418c3d..810857a 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -6,6 +6,9 @@ + + + diff --git a/src/router/index.js b/src/router/index.js index b0ae82a..0bc67ef 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -151,21 +151,6 @@ export const constantRoutes = [ } ] }, - - // { - // path: '/setting/user', - // component: Layout, - // children: [ - // { - // path: '', - // name: 'setting-user', - // component: () => import('@/views/setting/user/index'), - // meta: { title: '设置' }, - // hidden: true - // } - // ] - // }, - // { // path: '/demo', // component: Layout, @@ -182,6 +167,7 @@ export const constantRoutes = [ { path: '/markdown', component: Layout, + hidden: true, children: [ { path: 'editor', @@ -201,7 +187,7 @@ export const constantRoutes = [ name: 'article', component: () => import('@/views/public/article/index'), hidden: true, - meta: { keepAlive: true } + meta: { keepAlive: false } } ] }, @@ -211,7 +197,7 @@ export const constantRoutes = [ children: [ { path: `${document.location.protocol}//${window.location.host}/articles`, - meta: { title: '关联博客', icon: 'link', keepAlive: true } + meta: { title: '关联博客', icon: 'link', keepAlive: false } } ] }, @@ -222,35 +208,61 @@ export const constantRoutes = [ { path: '', name: 'setting-user', - component: () => import('@/views/setting/user/index'), + component: () => import('@/views/setting/user/tabs/cusomerInfo'), meta: { title: '个人信息' , icon: 'UserSettings'} } ] }, { - path: '/setting/manager-categories', + path: '/setting/manager-users', component: Layout, children: [ { path: '', - name: 'manager-categories', - component: () => import('@/views/setting/articles/categoryManager'), - meta: { title: '分类管理', icon: 'leimupinleifenleileibie' } + name: 'manager-users', + component: () => import('@/views/setting/user/tabs/cusomerManager'), + meta: { title: '用户管理' , icon: 'huaban'} } ] }, { - path: '/setting/manager-blog', + path: '/setting/website', component: Layout, + name: 'website', + meta: { title: '网站管理', icon: 'wangzhan'}, children: [ { - path: '', + path: 'manager-articles', + name: 'manager-articles', + component: () => import('@/views/setting/articles/articleManager'), + meta: { title: '文章管理' , icon: 'guanlizhuanjiawenzhang'} + }, + { + path: 'manager-blog', name: 'manager-blog', component: () => import('@/views/setting/articles/blogManager'), - meta: { title: '博客管理' , icon: 'blogger'} + meta: { title: '外观设置' , icon: 'pifu'} + }, + { + path: 'manager-categories', + name: 'manager-categories', + component: () => import('@/views/setting/articles/categoryManager'), + meta: { title: '分类管理', icon: 'fenlei' } } ] }, + // { + // path: '/setting/manager-categories', + // component: Layout, + // children: [ + // { + // path: '', + // name: 'manager-categories', + // component: () => import('@/views/setting/articles/categoryManager'), + // meta: { title: '分类管理', icon: 'leimupinleifenleileibie' } + // } + // ] + // }, { path: '/setting/manager-cloud', component: Layout, @@ -266,12 +278,13 @@ export const constantRoutes = [ { path: '/articles', component: Layout, + hidden: true, children: [ { path: '', name: 'articles', component: () => import('@/views/public/articles/index'), - meta: { title: '文档列表', icon: 'md-list', keepAlive: true } + meta: { title: '文档列表', icon: 'md-list', keepAlive: false } } ] }, diff --git a/src/styles/markdown.scss b/src/styles/markdown.scss index 369b88e..e4d38e0 100644 --- a/src/styles/markdown.scss +++ b/src/styles/markdown.scss @@ -212,16 +212,20 @@ } } .animateIn { - transform: translateY(0px); + //-webkit-transform: translateY(0px); + //transform: translateY(0px); } .animateOut { + -webkit-transform: translateY(-100%); transform: translateY(-100%); } .animateLeft { + -webkit-transform: translateX(-10rem); transform: translateX(-10rem); } .animateRight { + -webkit-transform: translateX(0rem); transform: translateX(0rem); } @@ -567,6 +571,13 @@ border-radius: 8px; } +.article-body { + padding: 20px 35px; + border-radius: 0.5rem; + background-color: #ffffff; + box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px 0px; +} + /deep/ .markdown-body { border-radius: 0.5rem; blockquote { diff --git a/src/styles/sidebar.scss b/src/styles/sidebar.scss index d411af9..780064d 100644 --- a/src/styles/sidebar.scss +++ b/src/styles/sidebar.scss @@ -75,25 +75,24 @@ margin: 2px 5px 2px 5px; } } - .el-menu-item.is-active { color: #409EFF; - background-color: #d9d9d9 !important; + background-color: $menuHover !important; border-radius: 4px; - margin: 2px 5px 2px 5px; } .is-active>.el-submenu__title { - color: $subMenuActiveText !important; + //color: $subMenuActiveText !important; } & .nest-menu .el-submenu>.el-submenu__title, & .el-submenu .el-menu-item { - min-width: $sideBarWidth !important; - background-color: $subMenuBg !important; - + margin: 2px 5px; + height: 42px; + line-height: 42px; &:hover { background-color: $subMenuHover !important; + border-radius: 4px; } } } diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 7f7c3e6..71603b7 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -6,8 +6,8 @@ $subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951 $menuBg:#f5f5f5; $menuHover:#d9d9d9; -$subMenuBg:#1f2d3d; -$subMenuHover:#001528; +$subMenuBg:#f5f5f5; +$subMenuHover:#d9d9d9; $sideBarWidth: 210px; diff --git a/src/views/markdown/index.vue b/src/views/markdown/index.vue index f30dde3..c320cf7 100644 --- a/src/views/markdown/index.vue +++ b/src/views/markdown/index.vue @@ -1,37 +1,40 @@