<el-menu
router
:default-openeds="defaultOpened"
default-active="$route.path"
active-text-color="-sharpFEB307"
>
<el-submenu v-for="tab in menus" :index="tab.url" :key="tab.url">
<template slot="title" class="title">
<i :class="["iconfont",tab.icon]"></i>
<span>{{tab.title}}</span>
</template>
<el-menu-item v-for="(item,$index) in tab.child" :index="item.path" :key="$index">
<i class="iconfont icon-dian"></i>
<span>{{item.lable}}</span>
</el-menu-item>
</el-submenu>
</el-menu>
menus: [
{
title: "",
url: "seller",
icon: "icon-maichu1",
child: [
{
lable: "",
path: "/postBill"
},
{
lable: "",
path: "/myBill"
},
{
lable: "",
path: "/sellerOrder"
}
]
},
{
title: "",
url: "buyer",
icon: "icon-mairu1",
child: [
{
lable: "",
path: ""
},
{
lable: "",
path: ""
},
{
lable: "",
path: ""
}
]
},
{
title: "",
url: "enterprise",
icon: "icon-qiyeguanli",
child: [
{
lable: "",
path: ""
},
{
lable: "",
path: ""
},
{
lable: "",
path: ""
},
{
lable: "",
path: ""
},
{
lable: "",
path: ""
}
]
}
]
according to the demand default all menus are open (realized), click to close the current menu, and then click to open the current menu, click on the right blank area does not shrink or open the menu
but now the problem is:
1, click: I am the buyer, three types of menus will be contracted, and then click will only open the current menu;
2, click on the right blank area will all shrink.
does any boss know how to solve it?