Selaa lähdekoodia

[FIX] 表单提交异常 与 加载

Kunduin 7 vuotta sitten
vanhempi
commit
1e209d1b5a

+ 2 - 0
src/views/login/Login.vue

@@ -83,6 +83,8 @@ export default {
   },
   methods: {
     async loginAction() {
+      if (this.submitting) return;
+
       this.isServerError = false;
       this.$v.$touch();
       if (!this.$v.$invalid) {

+ 2 - 0
src/views/login/Register.vue

@@ -133,6 +133,8 @@ export default {
   },
   methods: {
     async registerAction() {
+      if (this.submitting) return;
+
       this.isServerError = false;
       this.$v.$touch();
       if (!this.$v.$invalid) {

+ 2 - 0
src/views/setting/Password.vue

@@ -94,6 +94,8 @@ export default {
   },
   methods: {
     async registerAction() {
+      if (this.submitting) return;
+
       this.isServerError = false;
       this.$v.$touch();
       if (!this.$v.$invalid) {

+ 2 - 0
src/views/setting/Profile.vue

@@ -55,6 +55,8 @@ export default {
   },
   methods: {
     async updateProfileAction() {
+      if (this.submitting) return;
+
       this.isServerError = false;
       this.$v.$touch();
       if (!this.$v.$invalid) {

+ 4 - 0
src/views/student/Group/index.vue

@@ -183,6 +183,8 @@ export default {
   },
   methods: {
     async createGroup() {
+      if (this.submitLoading) return;
+
       this.isServerError = false;
       this.$v.$touch();
       if (!this.$v.name.$invalid) {
@@ -208,6 +210,8 @@ export default {
       }
     },
     async joinGroup() {
+      if (this.submitLoading) return;
+
       this.isServerError = false;
       this.$v.$touch();
       if (!this.$v.code.$invalid) {

+ 2 - 0
src/views/teacher/Review/index.vue

@@ -268,6 +268,8 @@ export default {
       }
     },
     async submit() {
+      if (this.submitting) return;
+
       this.isServerError = false;
       this.$v.$touch();
       if (!this.$v.$invalid) {