From 0a670fdfd735f73d951449081238043729300095 Mon Sep 17 00:00:00 2001 From: e <“> Date: Sat, 8 Apr 2023 04:47:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B0=86el-scrollbar=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=B0main-container=E4=B8=8B=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=A7=BB=E5=87=BA=E6=97=B6=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/sidebar.scss | 2 +- ruoyi-ui/src/layout/index.vue | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/sidebar.scss b/ruoyi-ui/src/assets/styles/sidebar.scss index 43d5f9a..9f39046 100644 --- a/ruoyi-ui/src/assets/styles/sidebar.scss +++ b/ruoyi-ui/src/assets/styles/sidebar.scss @@ -1,7 +1,7 @@ #app { .main-container { - min-height: 100%; + height: 100%; transition: margin-left .28s; margin-left: $base-sidebar-width; position: relative; diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue index 8f88d86..b7c9ab0 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/ruoyi-ui/src/layout/index.vue @@ -1,19 +1,19 @@ From 1067567f1c7b5a4a809e5e5478323bf983b9136b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B9=E5=BF=97=E8=8A=B3?= Date: Sun, 9 Apr 2023 13:20:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=E4=BC=98=E5=8C=96=EF=BC=9A?= =?UTF-8?q?1.=E5=B7=B2=E9=80=89=E6=8B=A9=E5=9B=BE=E6=A0=87=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=E5=9B=9E=E6=98=BE=202.=E6=BB=9A=E5=8A=A8=E6=9D=A1?= =?UTF-8?q?=E9=87=87=E7=94=A8el-scrollbar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/components/IconSelect/index.vue | 80 +++++++++++++++----- ruoyi-ui/src/views/system/menu/index.vue | 2 +- 2 files changed, 63 insertions(+), 19 deletions(-) diff --git a/ruoyi-ui/src/components/IconSelect/index.vue b/ruoyi-ui/src/components/IconSelect/index.vue index 2ace122..2404321 100644 --- a/ruoyi-ui/src/components/IconSelect/index.vue +++ b/ruoyi-ui/src/components/IconSelect/index.vue @@ -1,14 +1,20 @@ @@ -17,6 +23,11 @@ import icons from './requireIcons' export default { name: 'IconSelect', + props: { + activeIcon: { + type: String + } + }, data() { return { name: '', @@ -46,22 +57,55 @@ export default { .icon-body { width: 100%; padding: 10px; + .icon-search { + position: relative; + margin-bottom: 5px; + } .icon-list { height: 200px; - overflow-y: scroll; - div { - height: 30px; - line-height: 30px; - margin-bottom: -5px; - cursor: pointer; - width: 33%; - float: left; + ::v-deep .el-scrollbar { + height: 100%; + .el-scrollbar__wrap { + overflow-x: hidden; + } } - span { - display: inline-block; - vertical-align: -0.15em; - fill: currentColor; - overflow: hidden; + .list-container { + display: flex; + flex-wrap: wrap; + .icon-item-wrapper { + width: calc(100% / 3); + height: 30px; + line-height: 30px; + margin-bottom: -5px; + cursor: pointer; + display: flex; + .icon-item { + display: flex; + max-width: 100%; + height: 100%; + padding: 0 2px; + &:hover { + background: #ececec; + border-radius: 5px; + } + .icon { + flex-shrink: 0; + } + span { + display: inline-block; + vertical-align: -0.15em; + fill: currentColor; + padding-left: 2px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + .icon-item.active { + background: #ececec; + border-radius: 5px; + } + } } } } diff --git a/ruoyi-ui/src/views/system/menu/index.vue b/ruoyi-ui/src/views/system/menu/index.vue index 2ee25af..2a83f9e 100644 --- a/ruoyi-ui/src/views/system/menu/index.vue +++ b/ruoyi-ui/src/views/system/menu/index.vue @@ -134,7 +134,7 @@ trigger="click" @show="$refs['iconSelect'].reset()" > - +