Эх сурвалжийг харах

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

xiaoxian521 1 жил өмнө
parent
commit
73b5d3ec41

+ 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;