Просмотр исходного кода

Merge branch 'iteration-class'

lex 1 год назад
Родитель
Сommit
71167ce07e

+ 5 - 5
src/views/classList/modals/createClass.tsx

@@ -24,7 +24,7 @@ export default defineComponent({
       type: Array,
       default: () => []
     },
-    subjectList:{
+    subjectList: {
       type: Array,
       default: () => []
     }
@@ -40,24 +40,24 @@ export default defineComponent({
     const createClassForm = reactive({
       currentGradeNum: null,
       currentClass: null,
-      subjectId:null
+      subjectId: null
     });
     const submitForms = () => {
-      data.uploading = true
       foemsRef.value.validate(async (error: any) => {
         if (error) {
           return;
         }
+        data.uploading = true;
         try {
           const res = await addClass({ ...createClassForm });
           message.success('新增成功');
           emit('close');
           emit('getList');
-          data.uploading = false
+          data.uploading = false;
         } catch (e) {
-          data.uploading = false
           console.log(e);
         }
+        data.uploading = false;
       });
     };
     return () => (

+ 2 - 2
src/views/classList/modals/resetSubject.tsx

@@ -50,11 +50,11 @@ export default defineComponent({
       createClassForm.id = props.activeRow.id;
     });
     const submitForms = () => {
-      data.uploading = true;
       foemsRef.value.validate(async (error: any) => {
         if (error) {
           return;
         }
+        data.uploading = true;
         try {
           const res = await resetClass({ ...createClassForm });
           message.success('修改成功');
@@ -62,9 +62,9 @@ export default defineComponent({
           emit('getList');
           data.uploading = false;
         } catch (e) {
-          data.uploading = false;
           console.log(e);
         }
+        data.uploading = false;
       });
     };
     return () => (

+ 1 - 0
src/views/prepare-lessons/model/subject-sync/index.module.less

@@ -46,6 +46,7 @@
     border-radius: 18px;
     width: 120px;
     height: 120px;
+    object-fit: contain;
   }
 
   .iconSelect {