How does the navigation of element-ui make it possible to click only to shrink the current menu?

clipboard.png

<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?

Jan.14,2022

this is probably the problem of element-ui upgrade. See if your element-ui is 2.4.10. If so, please downgrade it to 2.4.9. This can solve some of the problems


my version 2.4.5 will cause this problem, just upgrade to the latest one.


solved, this is the problem of element-ui version

Menu