Skip to content

Commit 7e32834

Browse files
committed
fix: 修复微信悬浮球图标为群聊图标,保持二维码原始比例
1 parent e1b494a commit 7e32834

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/components/WechatFloat.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
}
3838

3939
.wechat-popup img {
40-
width: 180px;
41-
height: 180px;
40+
max-width: 220px;
41+
height: auto;
4242
border-radius: 8px;
4343
}
4444

src/components/WechatFloat.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ export default function WechatFloat() {
1010
onMouseEnter={() => setIsHovered(true)}
1111
onMouseLeave={() => setIsHovered(false)}
1212
>
13-
<div className="wechat-icon">💬</div>
13+
<div className="wechat-icon">
14+
<svg viewBox="0 0 24 24" width="28" height="28" fill="white">
15+
<path d="M8.5 11.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm-6.5 5a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zM9 3C4.58 3 1 6.13 1 10c0 2.17 1.16 4.1 3 5.38V19l3.5-2.1c.5.07 1 .1 1.5.1 4.42 0 8-3.13 8-7s-3.58-7-8-7zm6.5 16.5l2.5 1.5v-2.62c1.84-1.28 3-3.21 3-5.38 0-2.17-1.16-4.1-3-5.38V5c2.76 1.5 4.5 4.5 4.5 8 0 5-4.03 9-9 9-.5 0-1-.03-1.5-.1l3-1.9z"/>
16+
</svg>
17+
</div>
1418
{isHovered && (
1519
<div className="wechat-popup">
1620
<img src="./wechat-qr.png" alt="微信二维码" />

0 commit comments

Comments
 (0)