!18 fix:登录验证码错位和退出系统页面抖动问题修复

Merge pull request !18 from skyselang/bugfix
This commit is contained in:
haoxr 2024-01-16 07:12:33 +00:00 committed by Gitee
commit 5a68c85821
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 25 additions and 10 deletions

View File

@ -70,7 +70,9 @@ function logout() {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
lockScroll: false,
})
.then(() => {
userStore
.logout()
.then(() => {
@ -79,7 +81,8 @@ function logout() {
.then(() => {
router.push(`/login?redirect=${route.fullPath}`);
});
});
})
.catch(() => {});
}
</script>
<style lang="scss" scoped>

View File

@ -87,6 +87,7 @@
<el-image
:src="captchaBase64"
@click="getCaptcha"
:style="{ height: captchaHeight }"
class="w-[120px] h-[48px] cursor-pointer"
>
<template #error>
@ -238,6 +239,17 @@ function getCaptcha() {
captchaBase64.value = data.captchaBase64;
});
}
/**
* 根据组件大小调整验证码图片高度
*/
const captchaHeight = computed(() => {
if (appStore.size === "large") {
return "56px";
} else if (appStore.size === "small") {
return "40px";
}
return "48px";
});
/**
* 登录