소스 검색

点通知图标对应菜单选中

zhouna 3 년 전
부모
커밋
01b9f82416
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      src/components/AHeader/index.js

+ 3 - 4
src/components/AHeader/index.js

@@ -55,14 +55,13 @@ function AHeader({ history, hideName }) {
     }
     //未读消息页面显示并带入未读筛选条件
     function showMyMsgPage(){
-        const idName = '我的通知';
-        const item = panes.find((it) => it.key === idName);
+        const item = panes.find((it) => it.key === 'ZNTZ-WDTZ');
         if (item) {   //已存在当前tab,则定位即可不增加
-            dispatch(active({idName,isUnRead:true}));
+            dispatch(active({idName:'ZNTZ-WDTZ',isUnRead:true}));
             return;
         }
         dispatch(
-            add({ title: idName, content: <MyMessage />, key: idName,isUnRead:true})
+            add({ title: '我的通知', content: <MyMessage />, key: 'ZNTZ-WDTZ&我的通知',isUnRead:true})
         )
     }
     //获取组织列表