fix: 🐛 登录页验证码与输入框高度不一致(切换布局大小)问题修复

This commit is contained in:
skyselang 2024-01-16 11:56:51 +08:00
parent 90c25c57b1
commit 6230caae8c
1 changed files with 12 additions and 0 deletions

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";
});
/**
* 登录