Procházet zdrojové kódy

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

ZhangWenQiang před 6 roky
rodič
revize
e633ebd4ab
1 změnil soubory, kde provedl 5 přidání a 2 odebrání
  1. 5 2
      src/views/user/Login.vue

+ 5 - 2
src/views/user/Login.vue

@@ -215,7 +215,7 @@
         let loginParams = {
           remember_me: that.formLogin.rememberMe
         }
-        that.loading = true
+        that.loading = true;
         // 使用账户密码登陆
         if (that.customActiveKey === 'tab1') {
           that.form.validateFields(['username', 'password', 'inputCode'], { force: true }, (err, values) => {
@@ -228,7 +228,10 @@
               }).catch((err) => {
                 that.requestFailed(err)
               })
-
+            }else{
+              setTimeout(function() {
+                that.loading = false;
+              },1000)
             }
           })
           // 使用手机号登陆