Explorar o código

perf: 优化登录页`loading`判断

xiaoxian521 hai 1 ano
pai
achega
73b5d3ec41
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/views/login/index.vue

+ 2 - 1
src/views/login/index.vue

@@ -80,7 +80,8 @@ const onLogin = async (formEl: FormInstance | undefined) => {
               message("登录成功", { type: "success" });
             });
           }
-        });
+        })
+        .finally(() => (loading.value = false));
     } else {
       loading.value = false;
       return fields;