From d8ba39ebf21408340db4842e08ed25239b44cbf4 Mon Sep 17 00:00:00 2001 From: zhaojisen <1301338853@qq.com> Date: Fri, 24 May 2024 10:35:16 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=95=B4=E5=90=88=E6=94=B9=E9=80=A0?= =?UTF-8?q?=20menu=20=E6=A0=B7=E5=BC=8F=E4=BB=A5=E5=8F=8A=20table=20button?= =?UTF-8?q?=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DataActions/index.vue | 4 +- src/layout/components/NavLeft/SidebarItem.vue | 20 +- src/layout/components/NavLeft/index.vue | 244 +++++++++--------- src/layout/components/Page/PageHeading.vue | 53 ++-- src/styles/menu.scss | 239 ++++++++--------- src/styles/sidebar.scss | 90 ------- src/styles/variables.scss | 2 +- 7 files changed, 275 insertions(+), 377 deletions(-) diff --git a/src/components/DataActions/index.vue b/src/components/DataActions/index.vue index 46186b51e..2b298e7b5 100644 --- a/src/components/DataActions/index.vue +++ b/src/components/DataActions/index.vue @@ -250,10 +250,8 @@ $color-drop-menu-border: #e4e7ed; .el-button { display: flex; align-items: center; - height: 20px !important; - padding: 2px 6px; + padding: 3px 6px; color: $btn-text-color; - border-color: var(--color-primary); } ::v-deep .action-item.el-dropdown .el-button { diff --git a/src/layout/components/NavLeft/SidebarItem.vue b/src/layout/components/NavLeft/SidebarItem.vue index 286444643..3d0089a2b 100644 --- a/src/layout/components/NavLeft/SidebarItem.vue +++ b/src/layout/components/NavLeft/SidebarItem.vue @@ -13,7 +13,7 @@ > @@ -73,11 +73,13 @@ export default { // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237 // TODO: refactor with render function this.onlyOneChild = null - return {} + return { + } }, methods: { needHidden(item) { let hidden = item.hidden + if (typeof item.hidden === 'function') { hidden = item.hidden() } @@ -121,7 +123,7 @@ export default { // Show parent if there are no child router to display if (showingChildren.length === 0) { - this.onlyOneChild = { ... parent, path: '', noShowingChildren: true } + this.onlyOneChild = { ...parent, path: '', noShowingChildren: true } return true } @@ -139,15 +141,3 @@ export default { } } - - diff --git a/src/layout/components/NavLeft/index.vue b/src/layout/components/NavLeft/index.vue index ef4b3fff3..6b27b351a 100644 --- a/src/layout/components/NavLeft/index.vue +++ b/src/layout/components/NavLeft/index.vue @@ -1,5 +1,5 @@