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