no message

This commit is contained in:
小陌 2023-08-17 08:43:29 +08:00
parent 27cc707c25
commit 15e3abc98d
3 changed files with 18 additions and 18 deletions

View File

@ -51,7 +51,13 @@
if(item.meta.type=='iframe'){ if(item.meta.type=='iframe'){
item.path = `/i/${item.name}` 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) this.filterMenu(item.children)
}else{ }else{
this.menu.push(item) this.menu.push(item)
@ -82,8 +88,9 @@
filterRouter.forEach(item => { filterRouter.forEach(item => {
res.push({ res.push({
name: item.name, name: item.name,
children: item.children || [],
type: item.meta.type, 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, icon: item.meta.icon,
title: item.meta.title, title: item.meta.title,
breadcrumb: item.meta.breadcrumb.map(v => v.meta.title).join(' - ') breadcrumb: item.meta.breadcrumb.map(v => v.meta.title).join(' - ')
@ -107,10 +114,16 @@
document.body.removeChild(a) document.body.removeChild(a)
}, 10); }, 10);
}else{ }else{
this.$router.push({path: item.path}) this.getchildren(item);
} }
this.$emit('success', true) 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){ historyClick(text){
this.input = text this.input = text
this.inputChange(text) this.inputChange(text)

View File

@ -165,9 +165,9 @@
<Side-m v-if="ismobile"></Side-m> <Side-m v-if="ismobile"></Side-m>
<div class="aminui-body el-container"> <div class="aminui-body el-container">
<Topbar> <Topbar>
<Tags ref="tags" v-if="!ismobile && layoutTags"></Tags>
<userbar></userbar> <userbar></userbar>
</Topbar> </Topbar>
<Tags ref="tags" v-if="!ismobile && layoutTags"></Tags>
<div class="adminui-main" id="adminui-main"> <div class="adminui-main" id="adminui-main">
<router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }"> <router-view v-show="$route.meta.type!='iframe'" v-slot="{ Component }">
<keep-alive :include="this.$store.state.keepAlive.keepLiveRoute"> <keep-alive :include="this.$store.state.keepAlive.keepLiveRoute">
@ -287,7 +287,6 @@
}, },
getchildren(o){ getchildren(o){
console.log(o)
if (o && o.children && o.children.length > 0) { if (o && o.children && o.children.length > 0) {
return this.getchildren(o.children[0]); return this.getchildren(o.children[0]);
} }

View File

@ -77,7 +77,6 @@
return { return {
customizing: false, customizing: false,
allComps: allComps, allComps: allComps,
selectLayout: [],
defaultGrid: [], defaultGrid: [],
widgets: [], widgets: [],
} }
@ -220,7 +219,7 @@
.customizing .widgets-item { .customizing .widgets-item {
position: relative;margin-bottom: 15px; position: relative;margin-bottom: 15px;
border: 1px dashed var(--el-color-primary); 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 {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;} .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;} .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 { .dark {
.widgets-aside {background: #2b2b2b;} .widgets-aside {background: #2b2b2b;}
.customize-overlay {background: rgba(43,43,43,0.9);} .customize-overlay {background: rgba(43,43,43,0.9);}