소스 검색

重置数据

lex 11 달 전
부모
커밋
7fc6c16151
1개의 변경된 파일15개의 추가작업 그리고 1개의 파일을 삭제
  1. 15 1
      src/views/activation-code/instrument-registration/new-index.tsx

+ 15 - 1
src/views/activation-code/instrument-registration/new-index.tsx

@@ -174,6 +174,19 @@ export default defineComponent({
       }
     };
 
+    const phoneChangeEmptyInfo = () => {
+      studentInfo.password = '';
+      studentInfo.nickname = '';
+      studentInfo.gender = 1;
+      forms.areaName = '';
+      forms.schoolName = '';
+      forms.schoolAreaId = null;
+      forms.gradeNumText = '';
+      studentInfo.currentGradeNum = null;
+      forms.currentClassText = '';
+      studentInfo.currentClass = null;
+    };
+
     const checkForm = (status = true) => {
       if (!checkPhone(studentInfo.phone)) {
         status && showToast('请输入正确的手机号码');
@@ -299,7 +312,8 @@ export default defineComponent({
                 maxlength={11}
                 onUpdate:modelValue={() => {
                   forms.registerFlag = false;
-                  studentInfo.password = '';
+
+                  phoneChangeEmptyInfo();
                 }}></Field>
 
               <Field