From 47379dd702f1d976cc540d8d794b56d8daafa9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Thu, 4 May 2023 14:56:06 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=90=8C=E6=AD=A5=20ruoyi=20*=20updat?= =?UTF-8?q?e=20=E4=BC=98=E5=8C=96=20=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=20*=20fix=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20=E5=BC=80=E5=90=AFTopNav=E5=90=8E=E4=B8=80=E7=BA=A7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E8=B7=AF=E7=94=B1=E5=8F=82=E6=95=B0=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98=20*=20update=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20Vue=E7=9A=84DictTag=E7=BB=84=E4=BB=B6=20=E5=BD=93va?= =?UTF-8?q?lue=E6=B2=A1=E6=9C=89=E5=8C=B9=E9=85=8D=E7=9A=84=E5=80=BC?= =?UTF-8?q?=E6=97=B6=20=E5=B1=95=E7=A4=BA=E7=A9=BAvalue=20*=20update=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=20=E6=81=A2=E5=A4=8D=E7=BF=BB=E9=A1=B5/?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=B7=AF=E7=94=B1=E6=BB=9A=E5=8A=A8=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20*=20fix=20=E4=BF=AE=E5=A4=8D=20=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=A2=AB=E9=98=BB=E6=AD=A2=E6=97=B6vue-route?= =?UTF-8?q?r=E5=86=85=E9=83=A8=E4=BA=A7=E7=94=9F=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=97=AE=E9=A2=98=20*=20fix=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=20=E7=BC=93=E5=AD=98=E5=88=97=E8=A1=A8=EF=BC=9A?= =?UTF-8?q?=E5=A4=9A=E6=AC=A1=E6=B8=85=E9=99=A4=E6=93=8D=E4=BD=9C=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=B8=8D=E5=8F=98=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/components/DictTag/index.vue | 46 +++++++++++- ruoyi-ui/src/components/IconSelect/index.vue | 72 ++++++++++++++----- ruoyi-ui/src/components/TopNav/index.vue | 8 ++- ruoyi-ui/src/layout/components/AppMain.vue | 23 ++++++ .../layout/components/TagsView/ScrollPane.vue | 2 +- ruoyi-ui/src/layout/index.vue | 36 +++------- ruoyi-ui/src/router/index.js | 6 ++ ruoyi-ui/src/views/monitor/cache/list.vue | 2 +- ruoyi-ui/src/views/system/menu/index.vue | 2 +- 10 files changed, 148 insertions(+), 51 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/sidebar.scss b/ruoyi-ui/src/assets/styles/sidebar.scss index ed308b8dc..abe5b6317 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/components/DictTag/index.vue b/ruoyi-ui/src/components/DictTag/index.vue index 4c196c489..279b6137c 100644 --- a/ruoyi-ui/src/components/DictTag/index.vue +++ b/ruoyi-ui/src/components/DictTag/index.vue @@ -7,7 +7,7 @@ :key="item.value" :index="index" :class="item.raw.cssClass" - >{{ item.label }}{{ item.label + ' ' }} - {{ item.label }} + {{ item.label + ' ' }} + @@ -33,6 +36,16 @@ export default { default: null, }, value: [Number, String, Array], + // 当未找到匹配的数据时,显示value + showValue: { + type: Boolean, + default: true, + } + }, + data() { + return { + unmatchArray: [], // 记录未匹配的项 + } }, computed: { values() { @@ -42,11 +55,38 @@ export default { return []; } }, + unmatch(){ + this.unmatchArray = []; + if (this.value !== null && typeof this.value !== 'undefined') { + // 传入值为非数组 + if(!Array.isArray(this.value)){ + if(this.options.some(v=> v.value == this.value )) return false; + this.unmatchArray.push(this.value); + return true; + } + // 传入值为Array + this.value.forEach(item => { + if (!this.options.some(v=> v.value == item )) this.unmatchArray.push(item) + }); + return true; + } + // 没有value不显示 + return false; + }, + }, + filters: { + handleArray(array) { + if(array.length===0) return ''; + return array.reduce((pre, cur) => { + return pre + ' ' + cur; + }) + }, + } }; \ No newline at end of file + diff --git a/ruoyi-ui/src/components/IconSelect/index.vue b/ruoyi-ui/src/components/IconSelect/index.vue index 2ace1224f..8dadc028a 100644 --- a/ruoyi-ui/src/components/IconSelect/index.vue +++ b/ruoyi-ui/src/components/IconSelect/index.vue @@ -1,13 +1,17 @@