소스 검색

学生管理

11wqe1 7 달 전
부모
커밋
5a0c54ffb0
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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){
               console.log('111');
               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:[]});