Merge pull request #12262 from dataease/pr@dev-v2@perf_login_loading

perf: 登录页在页面组件加载完成前显示loading
This commit is contained in:
fit2cloud-chenyw 2024-09-18 16:29:47 +08:00 committed by GitHub
commit 5653227725
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,7 +88,7 @@ const getCurLocation = () => {
}
const formRef = ref<FormInstance | undefined>()
const duringLogin = ref(false)
const duringLogin = ref(true)
const handleLogin = () => {
if (!formRef.value) return
formRef.value.validate(async (valid: boolean) => {
@ -226,6 +226,7 @@ const switchTab = (name: string) => {
}
onMounted(async () => {
loadArrearance()
duringLogin.value = false
if (!checkPlatform()) {
const res = await loginCategoryApi()
const adminLogin = router.currentRoute?.value?.name === 'admin-login'