From 4a583c9480aa80e2a7a41dbc8952ec7fffa6eb31 Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Thu, 6 Aug 2026 16:10:39 +0800 Subject: [PATCH] =?UTF-8?q?style(h5):=20HomeToolIcon=20=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E6=94=BE=E5=A4=A7=E7=BA=A6=2039%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一按 prop×1.392 显示,并同步首页九宫格容器,避免裁切。 Co-authored-by: Cursor --- apps/user-h5/src/components/HomeToolIcon.vue | 3 ++- apps/user-h5/src/components/home/HomeToolGrid.vue | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/user-h5/src/components/HomeToolIcon.vue b/apps/user-h5/src/components/HomeToolIcon.vue index a085947..e2fd7f7 100644 --- a/apps/user-h5/src/components/HomeToolIcon.vue +++ b/apps/user-h5/src/components/HomeToolIcon.vue @@ -239,7 +239,8 @@ const props = withDefaults( const uid = useId().replace(/:/g, '') const f = computed(() => `url(#${uid}s)`) -const sizePx = computed(() => `${props.size}px`) +/** Display size = prop × 1.392 (cumulative icon scale). */ +const sizePx = computed(() => `${Math.round(props.size * 1.392)}px`) function g(key: string) { return `url(#${uid}${key})` } diff --git a/apps/user-h5/src/components/home/HomeToolGrid.vue b/apps/user-h5/src/components/home/HomeToolGrid.vue index 5e5f434..f0396b8 100644 --- a/apps/user-h5/src/components/home/HomeToolGrid.vue +++ b/apps/user-h5/src/components/home/HomeToolGrid.vue @@ -79,7 +79,7 @@ defineEmits<{ track: [label: string] }>() gap: 2px; } .tool-item { - width: 74px; + width: 88px; display: flex; flex-direction: column; align-items: center; @@ -93,8 +93,8 @@ defineEmits<{ track: [label: string] }>() transform: scale(0.9); } .tool-item .icon { - width: 54px; - height: 54px; + width: 75px; + height: 75px; display: flex; align-items: center; justify-content: center;