From 1b80a6cfb9266d8a84734da4183892f52061ee88 Mon Sep 17 00:00:00 2001 From: Cat Tom Date: Wed, 26 Mar 2025 11:05:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20SocialLinks=20?= =?UTF-8?q?=E5=92=8C=20WechatModal=20=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=BC=BA=E5=93=8D=E5=BA=94=E5=BC=8F=E5=B8=83?= =?UTF-8?q?=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SocialLinks.vue | 29 ++++++++++++++++++++++++----- src/components/WechatModal.vue | 32 ++++++++++++++++++++------------ 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/src/components/SocialLinks.vue b/src/components/SocialLinks.vue index 76b6a01..911c4e6 100644 --- a/src/components/SocialLinks.vue +++ b/src/components/SocialLinks.vue @@ -159,6 +159,9 @@ const openLink = (url) => { overflow: hidden; transition: background 0.3s ease, box-shadow 0.3s ease; border: 1px solid rgba(255, 255, 255, 0.05); + width: 100%; + max-width: 600px; + margin: 0 auto; } /* 暗黑模式适配 */ @@ -170,7 +173,7 @@ const openLink = (url) => { .social-grid { display: grid; - grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 1.2rem; position: relative; z-index: 2; @@ -197,8 +200,8 @@ const openLink = (url) => { } .social-icon-wrapper { - width: 3.5rem; - height: 3.5rem; + width: 4rem; + height: 4rem; display: flex; align-items: center; justify-content: center; @@ -211,7 +214,7 @@ const openLink = (url) => { } .social-icon { - font-size: 1.6rem; + font-size: 1.8rem; transition: all 0.3s ease; } @@ -256,10 +259,26 @@ const openLink = (url) => { /* 响应式调整 */ @media (max-width: 768px) { .social-grid { - grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 1rem; } + .social-icon-wrapper { + width: 3.5rem; + height: 3.5rem; + } + + .social-icon { + font-size: 1.6rem; + } +} + +@media (max-width: 480px) { + .social-grid { + grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); + gap: 0.8rem; + } + .social-icon-wrapper { width: 3rem; height: 3rem; diff --git a/src/components/WechatModal.vue b/src/components/WechatModal.vue index a1845e3..f0c4bc0 100644 --- a/src/components/WechatModal.vue +++ b/src/components/WechatModal.vue @@ -273,13 +273,16 @@ onUnmounted(() => { display: inline-block; margin-bottom: 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); - min-width: 240px; - min-height: 240px; + width: 280px; + height: 280px; + display: flex; + align-items: center; + justify-content: center; } .qr-code-image { - width: 240px; - height: 240px; + width: 100%; + height: 100%; object-fit: contain; display: block; transition: opacity 0.3s ease; @@ -383,18 +386,23 @@ onUnmounted(() => { } /* 响应式布局 */ -@media (min-width: 360px) { +@media (max-width: 360px) { + .wechat-modal-container { + width: 95vw; + } + .qr-code-wrapper { + width: 240px; + height: 240px; + } +} + +@media (min-width: 361px) { .wechat-modal-container { width: min(420px, 90vw); } .qr-code-wrapper { - min-width: 280px; - min-height: 280px; - } - .qr-code-image { - width: 100%; - height: auto; - max-width: 280px; + width: 280px; + height: 280px; } }