From 15e3abc98d54bb2aec4376190cb7ea688677dd9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=99=8C?= Date: Thu, 17 Aug 2023 08:43:29 +0800 Subject: [PATCH] no message --- src/layout/components/search.vue | 19 ++++++++++++++++--- src/layout/index.vue | 3 +-- src/views/home/widgets/index.vue | 14 +------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/layout/components/search.vue b/src/layout/components/search.vue index b11f8ff..b3fa681 100644 --- a/src/layout/components/search.vue +++ b/src/layout/components/search.vue @@ -51,7 +51,13 @@ if(item.meta.type=='iframe'){ item.path = `/i/${item.name}` } - if(item.children&&item.children.length > 0&&!item.component){ + + if(item.children && item.children.length > 0){ + + if (item.component) { + // this.menu.push(item) + } + this.filterMenu(item.children) }else{ this.menu.push(item) @@ -82,8 +88,9 @@ filterRouter.forEach(item => { res.push({ name: item.name, + children: item.children || [], type: item.meta.type, - path: item.meta.type=="link"?item.path.slice(1):item.path, + path: item.meta.type == "link" ? item.path.slice(1) : item.path, icon: item.meta.icon, title: item.meta.title, breadcrumb: item.meta.breadcrumb.map(v => v.meta.title).join(' - ') @@ -107,10 +114,16 @@ document.body.removeChild(a) }, 10); }else{ - this.$router.push({path: item.path}) + this.getchildren(item); } this.$emit('success', true) }, + getchildren(o){ + if (o && o.children && o.children.length > 0) { + return this.getchildren(o.children[0]); + } + this.$router.push({path:o.path}) + }, historyClick(text){ this.input = text this.inputChange(text) diff --git a/src/layout/index.vue b/src/layout/index.vue index 7424265..e97e0ac 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -165,9 +165,9 @@
+ -
@@ -287,7 +287,6 @@ }, getchildren(o){ - console.log(o) if (o && o.children && o.children.length > 0) { return this.getchildren(o.children[0]); } diff --git a/src/views/home/widgets/index.vue b/src/views/home/widgets/index.vue index 3126f8b..3088a64 100644 --- a/src/views/home/widgets/index.vue +++ b/src/views/home/widgets/index.vue @@ -77,7 +77,6 @@ return { customizing: false, allComps: allComps, - selectLayout: [], defaultGrid: [], widgets: [], } @@ -220,7 +219,7 @@ .customizing .widgets-item { position: relative;margin-bottom: 15px; border: 1px dashed var(--el-color-primary); - padding: 15px; + padding: 15px; } .customize-overlay {position: absolute;top:0;right:0;bottom:0;left:0;z-index: 1;display: flex;flex-direction: column;align-items: center;justify-content: center;background: rgba(255,255,255,0.9);cursor: move;} .customize-overlay label {background: var(--el-color-primary);color: #fff;height:40px;padding:0 30px;border-radius: 40px;font-size: 18px;display: flex;align-items: center;justify-content: center;cursor: move;} @@ -238,17 +237,6 @@ .widgets-wrapper .sortable-ghost {opacity: 0.5;} - .selectLayout {width: 100%;display: flex;} - .selectLayout-item {width:60px;height:60px;border: 2px solid var(--el-border-color-light);padding:5px;cursor: pointer;margin-right: 15px;} - .selectLayout-item span {display: block;background: var(--el-border-color-light);height:46px;} - .selectLayout-item.item02 span {height:30px;} - .selectLayout-item.item02 .el-col:nth-child(1) span {height:14px;margin-bottom: 2px;} - .selectLayout-item.item03 span {height:14px;margin-bottom: 2px;} - .selectLayout-item:hover {border-color: var(--el-color-primary);} - .selectLayout-item.active {border-color: var(--el-color-primary);} - .selectLayout-item.active span {background: var(--el-color-primary);} - - .dark { .widgets-aside {background: #2b2b2b;} .customize-overlay {background: rgba(43,43,43,0.9);}