forked from github/dataease
Merge pull request #12262 from dataease/pr@dev-v2@perf_login_loading
perf: 登录页在页面组件加载完成前显示loading
This commit is contained in:
commit
5653227725
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user