Browse Source

菜单选中bug

zhouna 3 years ago
parent
commit
538641ddd5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/components/AMenu/index.js

+ 1 - 1
src/components/AMenu/index.js

@@ -48,7 +48,7 @@ function AMenu() {
     //切换菜单、增加tab
     function changeMenu(val) {
         const idName = val.key.split("&");
-        const item = panes.find((it) => it.key === idName[0]);
+        const item = panes.find((it) => it.key === val.key);
         //console.log(item);
         if (item) {   //已存在当前tab,则定位即可不增加
             dispatch(active({idName:val.key}));