improve: 菜单判断处理

This commit is contained in:
From-wh 2023-04-28 16:33:40 +08:00
parent 4c0e4e2e8f
commit dd8eeb2a35
5 changed files with 13 additions and 7 deletions

View File

@ -120,6 +120,7 @@ export default {
// 设置菜单导航是否固定(移动端)
initMenuFixed(clientWidth) {
this.clientWidth = clientWidth;
this.$emit('routesListChange');
},
},
// 页面销毁时

View File

@ -275,7 +275,7 @@
</el-radio-group>
</div>
</div>
<div class="layout-breadcrumb-seting-bar-flex mt15">
<div class="layout-breadcrumb-seting-bar-flex mt15" v-if="getThemeConfig.layout === 'columns'">
<div class="layout-breadcrumb-seting-bar-flex-label">{{ $t('message.layout.fiveColumnsAsideStyle') }}</div>
<div class="layout-breadcrumb-seting-bar-flex-value">
<el-radio-group v-model="getThemeConfig.columnsAsideStyle" size="mini" @change="setLocalThemeConfig">
@ -535,6 +535,7 @@ export default {
if (this.$store.state.themeConfig.themeConfig.layout === layout) return false;
this.$store.state.themeConfig.themeConfig.layout = layout;
this.$store.state.themeConfig.themeConfig.isDrawer = false;
this.$store.state.themeConfig.themeConfig.columnsAsideStyle = 'columns-card';
// this.initSetLayoutChange();
this.setLocalTheme(this.$store.state.themeConfig.themeConfig.themeStyle);
},

View File

@ -9,14 +9,18 @@
@select="onHorizontalSelect"
>
<template v-for="val in menuList">
<el-submenu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
<el-submenu
:index="val.path"
v-if="val.is_show && val.children && val.children.length > 0"
:key="val.path"
>
<template slot="title">
<Icon :type="val.icon ? val.icon : ''" />
<span>{{ $t(val.title) }}</span>
</template>
<SubItem :chil="val.children" />
</el-submenu>
<template v-else>
<template v-else-if="val.is_show">
<el-menu-item :index="val.path" :key="val.path">
<template slot="title" v-if="!val.isLink || (val.isLink && val.isIframe)">
<Icon :type="val.icon ? val.icon : ''" />

View File

@ -7,14 +7,14 @@
<template>
<div>
<template v-for="val in chil">
<el-submenu :index="val.path" :key="val.path" v-if="!val.is_show_path && val.children && val.children.length > 0">
<el-submenu :index="val.path" :key="val.path" v-if="val.is_show && val.children && val.children.length > 0">
<template slot="title">
<i class="ivu-icon" :class="val.icon"></i>
<span>{{ $t(val.title) }}</span>
</template>
<sub-item :chil="val.children" />
</el-submenu>
<template v-else-if="!val.is_show_path">
<template v-else-if="val.is_show">
<el-menu-item :index="val.path" :key="val.path">
<template v-if="!val.isLink || (val.isLink && val.isIframe)">
<i class="ivu-icon" :class="val.icon ? val.icon : ''"></i>

View File

@ -12,7 +12,7 @@
<template v-for="val in menuList">
<el-submenu
:index="val.path"
v-if="!val.is_show_path && val.children && val.children.length > 0"
v-if="val.is_show && val.children && val.children.length > 0"
:key="val.path"
>
<template slot="title">
@ -26,7 +26,7 @@
</template>
<SubItem :chil="val.children" />
</el-submenu>
<template v-else-if="!val.is_show_path">
<template v-else-if="val.is_show">
<el-menu-item :index="val.path" :key="val.path">
<Icon
:class="