mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
解决菜单配置 isShow 异常处理
This commit is contained in:
parent
9d1034460e
commit
efa7ea764a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cool-admin-vue",
|
||||
"version": "3.1.1",
|
||||
"version": "3.1.2",
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
|
@ -6,7 +6,7 @@
|
||||
background-color="transparent"
|
||||
@select="onSelect"
|
||||
>
|
||||
<el-menu-item v-for="(item, index) in menuGroup" :index="`${index}`" :key="index">
|
||||
<el-menu-item v-for="(item, index) in list" :index="`${index}`" :key="index">
|
||||
<icon-svg v-if="item.icon" :name="item.icon"></icon-svg>
|
||||
<span>{{ item.name }}</span>
|
||||
</el-menu-item>
|
||||
@ -28,7 +28,11 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(["menuGroup"])
|
||||
...mapGetters(["menuGroup"]),
|
||||
|
||||
list() {
|
||||
return this.menuGroup.filter(e => e.isShow);
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
@ -42,7 +42,7 @@ export default {
|
||||
}
|
||||
|
||||
const routes = res.menus
|
||||
.filter(e => e.type != 2 && e.isShow)
|
||||
.filter(e => e.type != 2)
|
||||
.map(e => {
|
||||
return {
|
||||
moduleName: e.moduleName,
|
||||
|
Loading…
Reference in New Issue
Block a user