diff --git a/src/layout/Layout.vue b/src/layout/Layout.vue index a991b771..65abf902 100644 --- a/src/layout/Layout.vue +++ b/src/layout/Layout.vue @@ -66,11 +66,13 @@ export default { position: relative; height: 100%; width: 100%; - &.mobile.openSidebar{ + + &.mobile.openSidebar { position: fixed; top: 0; } } + .drawer-bg { background: #000; opacity: 0.3; @@ -80,18 +82,21 @@ export default { position: absolute; z-index: 999; } - .fixed-header{ + + .fixed-header { position: fixed; top: 0; right: 0; z-index: 9; width: calc(100% - #{$sideBarWidth}); - transition: width 0.28s; + transition: width 0.28s; } - .hideSidebar .fixed-header{ - width: calc(100% - 54px) + + .hideSidebar .fixed-header { + width: calc(100% - 54px) } - .mobile .fixed-header{ + + .mobile .fixed-header { width: 100%; } diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index f6e1ea10..e8eb633e 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -24,7 +24,7 @@ export default { diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 073fede5..669d8251 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -105,6 +105,7 @@ export default { float: left; cursor: pointer; transition: background .3s; + -webkit-tap-highlight-color:transparent; &:hover { background: rgba(0, 0, 0, .025) diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index 96e8bb5c..912fb71a 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -20,6 +20,11 @@ +
+ 侧边栏 Logo + +
+ @@ -31,7 +36,7 @@ export default { components: { ThemePicker }, data() { return { - sidebarLogo: true + } }, computed: { @@ -56,6 +61,17 @@ export default { value: val }) } + }, + sidebarLogo: { + get() { + return this.$store.state.settings.sidebarLogo + }, + set(val) { + this.$store.dispatch('settings/changeSetting', { + key: 'sidebarLogo', + value: val + }) + } } } } diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue new file mode 100644 index 00000000..6946149e --- /dev/null +++ b/src/layout/components/Sidebar/Logo.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 4c4d6db4..f02a4819 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,31 +1,38 @@