mirror of
https://gitee.com/log4j/pig-ui.git
synced 2025-01-03 23:42:23 +08:00
fixed #IIOGM
This commit is contained in:
parent
dcc489cb2f
commit
64b13f416d
@ -1,17 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="menu-wrapper">
|
<div class="menu-wrapper">
|
||||||
<template v-for="(item,index) in menu">
|
<template v-for="(item,index) in menu">
|
||||||
<el-menu-item v-if="item.children.length===0 " :index="item.path" @click="open(item)" :key="item.label">
|
<el-menu-item v-if="item.children.length===0 " :index="filterPath(item.path,index)" @click="open(item)" :key="item.label">
|
||||||
<i :class="item.icon"></i>
|
<i :class="item.icon"></i>
|
||||||
<span slot="title">{{item.label}}</span>
|
<span slot="title">{{item.label}}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-submenu v-else :index="item.label" :key="item.name">
|
<el-submenu v-else :index="filterPath(item.label,index)" :key="item.name">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<i :class="item.icon"></i>
|
<i :class="item.icon"></i>
|
||||||
<span slot="title" :class="{display:!show}">{{item.label}}</span>
|
<span slot="title" :class="{display:!show}">{{item.label}}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(child,cindex) in item.children">
|
<template v-for="(child,cindex) in item.children">
|
||||||
<el-menu-item :index="child.path" @click="open(child)" v-if="child.children.length==0" :key="cindex">
|
<el-menu-item :index="filterPath(child.path,cindex)" @click="open(child)" v-if="child.children.length==0" :key="cindex">
|
||||||
<i :class="child.icon"></i>
|
<i :class="child.icon"></i>
|
||||||
<span slot="title">{{child.label}}</span>
|
<span slot="title">{{child.label}}</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
@ -39,6 +39,9 @@ export default {
|
|||||||
created() {},
|
created() {},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
filterPath(path, index) {
|
||||||
|
return path == null ? index + "" : path;
|
||||||
|
},
|
||||||
open(item) {
|
open(item) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: resolveUrlPath(item.path, item.label),
|
path: resolveUrlPath(item.path, item.label),
|
||||||
@ -49,8 +52,5 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.display {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -12,4 +12,8 @@
|
|||||||
}
|
}
|
||||||
.el-select,.el-date-editor.el-input, .el-date-editor.el-input__inner{
|
.el-select,.el-date-editor.el-input, .el-date-editor.el-input__inner{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
.display,
|
||||||
|
.display + .el-submenu__icon-arrow {
|
||||||
|
display: none;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user