diff --git a/vue/src/assets/styles/index.scss b/vue/src/assets/styles/index.scss index ae872dc..76535b7 100644 --- a/vue/src/assets/styles/index.scss +++ b/vue/src/assets/styles/index.scss @@ -10,7 +10,7 @@ body { height: 100%; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; - font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; } html { diff --git a/vue/src/layout/components/Header.vue b/vue/src/layout/components/Header.vue index 037e512..1cb9b8c 100644 --- a/vue/src/layout/components/Header.vue +++ b/vue/src/layout/components/Header.vue @@ -2,12 +2,12 @@
- + - +
@@ -31,10 +31,7 @@ }, computed: { - ...mapState('setting', { - useTagsView: state => state.useTagsView, - headerAutoHidden: state => state.headerAutoHidden - }), + ...mapState('setting', ['useTagsView', 'headerAutoHidden']), hideHeader() { return this.mouseOutside @@ -56,6 +53,10 @@ }, methods: { + valueCtrl(key, value) { + this[key] = value + }, + moveEvent(e) { if (e.clientY <= 15) this.mouseOutside = false }, diff --git a/vue/src/layout/components/Main.vue b/vue/src/layout/components/Main.vue index 68943f4..ee4c521 100644 --- a/vue/src/layout/components/Main.vue +++ b/vue/src/layout/components/Main.vue @@ -38,18 +38,11 @@ components: {KeepRouterViewAlive}, computed: { - ...mapState('app', { - scrollTop: state => state.scrollTop, - }), - - ...mapState('setting', { - showBackToTop: state => state.showBackToTop - }), - - ...mapState('tagsView', { - cachedViews: state => state.cachedViews, - transitionName: state => state.transitionName - }), + ...mapState('app', ['scrollTop']), + + ...mapState('setting', ['showBackToTop']), + + ...mapState('tagsView', ['cachedViews', 'transitionName']), ...mapState('iframe', { showIframe: state => state.show, diff --git a/vue/src/layout/components/Navbar/index.vue b/vue/src/layout/components/Navbar/index.vue index ccee423..f6482f3 100644 --- a/vue/src/layout/components/Navbar/index.vue +++ b/vue/src/layout/components/Navbar/index.vue @@ -71,16 +71,9 @@ }, computed: { - ...mapState('user', { - avatar: state => state.avatar, - name: state => state.name, - prepare_logout: state => state.prepare_logout - }), - - ...mapState('setting', { - sidebarCollapse: state => state.sidebarCollapse, - showBreadcrumb: state => state.showBreadcrumb - }), + ...mapState('user', ['avatar', 'name', 'prepare_logout']), + + ...mapState('setting', ['sidebarCollapse', 'showBreadcrumb']), showSystemMonitor() { return auth('/system/monitor') diff --git a/vue/src/layout/components/Navbar/style.scss b/vue/src/layout/components/Navbar/style.scss index b1fcea1..6f3b8b7 100644 --- a/vue/src/layout/components/Navbar/style.scss +++ b/vue/src/layout/components/Navbar/style.scss @@ -4,6 +4,7 @@ height: $nav-height; overflow: hidden; position: relative; + z-index: 9; background: #fff; box-shadow: 0 1px 4px rgba(0, 21, 41, .08); diff --git a/vue/src/layout/components/Sidebar/components/Logo.vue b/vue/src/layout/components/Sidebar/components/Logo.vue index dab03d7..1b286da 100644 --- a/vue/src/layout/components/Sidebar/components/Logo.vue +++ b/vue/src/layout/components/Sidebar/components/Logo.vue @@ -1,25 +1,26 @@ - - - diff --git a/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue b/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue index a1f75e2..3860f76 100644 --- a/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue +++ b/vue/src/layout/components/Sidebar/components/SidebarItemContent.vue @@ -17,7 +17,7 @@ if (icon) { const isElIcon = icon.startsWith('el-icon-') - iconComponent = isElIcon ? : + iconComponent = isElIcon ? : } else iconComponent = diff --git a/vue/src/layout/components/Sidebar/index.vue b/vue/src/layout/components/Sidebar/index.vue index 65bd974..ce1589c 100644 --- a/vue/src/layout/components/Sidebar/index.vue +++ b/vue/src/layout/components/Sidebar/index.vue @@ -16,21 +16,11 @@ }, computed: { - ...mapState('app', { - device: state => state.device - }), - - ...mapState('resource', { - routes: state => state.sidebarMenus - }), - - ...mapState('setting', { - showLogo: state => state.showLogo, - sidebarCollapse: state => state.sidebarCollapse, - sidebarUniqueOpen: state => state.sidebarUniqueOpen, - sidebarShowParent: state => state.sidebarShowParent, - sidebarAutoHidden: state => state.sidebarAutoHidden - }), + ...mapState('app', ['device']), + + ...mapState('resource', ['sidebarMenus']), + + ...mapState('setting', ['showLogo', 'sidebarCollapse', 'sidebarUniqueOpen', 'sidebarShowParent', 'sidebarAutoHidden']), activeMenu() { const route = this.$route @@ -132,7 +122,7 @@ mode="vertical" on-select={this.select} > - {this.routes.map(route => ( + {this.sidebarMenus.map(route => ( this.mouseOutside = true} > {this.showLogo && } - {{menu}} + {{menu}} ) } diff --git a/vue/src/layout/components/Sidebar/style.scss b/vue/src/layout/components/Sidebar/style.scss index 2215dfc..a8c64cb 100644 --- a/vue/src/layout/components/Sidebar/style.scss +++ b/vue/src/layout/components/Sidebar/style.scss @@ -42,18 +42,18 @@ $iconSize: 17px; line-height: $nav-height; text-align: center; - & .sidebar-logo-link { + .sidebar-logo-link { height: 100%; width: 100%; - & .sidebar-logo { + .sidebar-logo { width: 32px; height: 32px; vertical-align: middle; margin-right: 12px; } - & .sidebar-title { + .sidebar-title { display: inline-block; margin: 0; color: #fff; @@ -74,14 +74,6 @@ $iconSize: 17px; .el-scrollbar { flex: 1; - - > .el-scrollbar__wrap { - overflow-x: hidden !important; - } - - > .el-scrollbar__bar.is-vertical { - right: 0; - } } } diff --git a/vue/src/layout/components/TagsView/index.vue b/vue/src/layout/components/TagsView/index.vue index 3258f39..97df36b 100644 --- a/vue/src/layout/components/TagsView/index.vue +++ b/vue/src/layout/components/TagsView/index.vue @@ -171,7 +171,7 @@ beforeDestroy() { //销毁前将路由动画改为fade - this.$store.commit('setting/transitionName', 'el-fade-in-linear') + this.$store.commit('tagsView/transitionName', 'el-fade-in-linear') }, mounted() { diff --git a/vue/src/layout/index.vue b/vue/src/layout/index.vue index daa2cc3..7f625cc 100644 --- a/vue/src/layout/index.vue +++ b/vue/src/layout/index.vue @@ -30,19 +30,11 @@ components: {VMain, VSidebar, VHeader}, computed: { - ...mapState('app', { - device: state => state.device, - hasHeader: state => state.hasHeader - }), + ...mapState('app', ['device', 'hasHeader']), - ...mapState('setting', { - useTagsView: state => state.useTagsView, - sidebarCollapse: state => state.sidebarCollapse - }), + ...mapState('setting', ['useTagsView', 'sidebarCollapse']), - ...mapState('socket', { - online: state => state.online - }), + ...mapState('socket', ['online']), ...mapState('user', { isLogin: state => !isEmpty(state.id) && !isEmpty(state.token) diff --git a/vue/src/views/app/login/index.vue b/vue/src/views/app/login/index.vue index a145553..c2de9c1 100644 --- a/vue/src/views/app/login/index.vue +++ b/vue/src/views/app/login/index.vue @@ -5,7 +5,7 @@