dusenyao 3 年之前
父节点
当前提交
882f5b265e
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/layouts/components/LayoutHeader.vue

+ 3 - 0
src/layouts/components/LayoutHeader.vue

@@ -115,7 +115,9 @@ export default {
     changeLoginNavIndex(key) {
       console.log(key);
       if (!key) return;
+      console.log(this.LoginNavIndex);
       this.LoginNavIndex = this.projectList.findIndex(item => item.key === key);
+      console.log(this.LoginNavIndex);
     },
     // 切换项目
     handleCommand(command) {
@@ -160,6 +162,7 @@ export default {
         .then(({ child_sys_list }) => {
           if (child_sys_list && child_sys_list.length > 0) {
             this.projectList = child_sys_list;
+            if (this.LoginNavIndex) return;
             this.projectList.forEach((item, index) => {
               if (item.key === 'GCLS-Learn') {
                 this.LoginNavIndex = index;