Browse Source

登录button添加loading属性,校验失败属性变为false

ZhangWenQiang 6 năm trước cách đây
mục cha
commit
8df2ad221c
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      src/views/user/Login.vue

+ 4 - 1
src/views/user/Login.vue

@@ -231,7 +231,7 @@
             }else{
               setTimeout(function() {
                 that.loading = false;
-              },1000)
+              },500)
             }
           })
           // 使用手机号登陆
@@ -297,11 +297,13 @@
       stepCaptchaCancel() {
         this.Logout().then(() => {
           this.loginBtn = false
+          this.loading = false
           this.stepCaptchaVisible = false
         })
       },
       loginSuccess() {
         this.loginBtn = false
+        this.loading = false
         this.$router.push({ name: 'dashboard' })
         this.$notification.success({
           message: '欢迎',
@@ -315,6 +317,7 @@
           duration: 4
         })
         this.loginBtn = false
+        this.loading = false
       },
       validateMobile(rule, value, callback) {
         if (!value || new RegExp(/^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/).test(value)) {