From 02251c738ee7a16b7593d130bffd4b28fb9753e6 Mon Sep 17 00:00:00 2001 From: dzl <786316265@qq.com> Date: Mon, 8 Sep 2025 11:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/MyProfile.vue | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/src/views/MyProfile.vue b/src/views/MyProfile.vue index 301159b..0198929 100644 --- a/src/views/MyProfile.vue +++ b/src/views/MyProfile.vue @@ -476,12 +476,44 @@ export default { .upload-btn { position: absolute; - bottom: -10px; + bottom: -30px; left: 50%; transform: translateX(-50%); - font-size: 12px; - padding: 4px 8px; border-radius: 12px; + min-width: 85px; /* 设置足够的最小宽度 */ + display: flex; + align-items: center; + justify-content: center; + padding: 6px 12px; + white-space: nowrap; /* 防止文字换行 */ +} + +/* 确保按钮文字始终居中 */ +.upload-btn :deep(.el-button__content) { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + text-align: center; + letter-spacing: 0.5px; /* 微调字间距,使文字分布更均匀 */ +} + +/* 响应式设计 - 小屏幕适配 */ +@media (max-width: 375px) { + .upload-btn { + min-width: 80px; /* 确保足够宽度容纳四个字 */ + font-size: 12px; + padding: 5px 10px; + } +} + +/* 针对更小的屏幕进一步调整 */ +@media (max-width: 320px) { + .upload-btn { + min-width: 75px; + font-size: 11px; + padding: 4px 8px; + } } .user-actions {