Ver Fonte

学生管理

11wqe1 há 3 dias atrás
pai
commit
5a0c54ffb0
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      src/components/pages/studentManageNew/index.vue

+ 6 - 1
src/components/pages/studentManageNew/index.vue

@@ -237,8 +237,13 @@ export default {
             if(this.activeId == '' || val ==1){
             if(this.activeId == '' || val ==1){
               console.log('111');
               console.log('111');
               this.activeId = box2[0].id;
               this.activeId = box2[0].id;
+              this.activeinfo = box2[0];
+            } else {
+              const activeItem = box2.find((item) => item.id === this.activeId);
+              if (activeItem) {
+                this.activeinfo = activeItem;
+              }
             }
             }
-            this.activeinfo = box2[0];
           }
           }
 
 
           box3.push({id:0,name:"兴趣班",children:[]});
           box3.push({id:0,name:"兴趣班",children:[]});