From 00bba28b5d4f7a733d8b50e72ba7034e299c7da8 Mon Sep 17 00:00:00 2001 From: Orion Date: Thu, 29 Oct 2026 17:22:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E5=8D=A1=E7=89=87=E6=82=AC=E6=B5=AE=E5=91=BD?= =?UTF-8?q?=E4=B8=AD=E5=8C=BA=E5=9F=9F=E4=B8=8E=E7=A7=BB=E5=8A=A8=E8=A1=8C?= =?UTF-8?q?=E4=B8=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 固定外层命中区域、内层负责位移及颜色阴影过渡,保持 2px 效果 * 为减少动画与触屏禁用位移,补充命中区域回归测试,83 项测试及构建通过 --- src/views/manage/FileManageView.vue | 36 ++++++++++++++++++++++------- tests/uiSystem.test.mjs | 9 ++++++++ 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/src/views/manage/FileManageView.vue b/src/views/manage/FileManageView.vue index fb76d6c..4a74398 100644 --- a/src/views/manage/FileManageView.vue +++ b/src/views/manage/FileManageView.vue @@ -1409,16 +1409,20 @@
-

{{ item.label }}

-

- {{ item.value }} -

+

{{ item.label }}

+

+ {{ item.value }} +

+
@@ -2574,6 +2578,22 @@ onUnmounted(() => { background-color 300ms ease, border-color 300ms ease !important; } +.fcb-storage-hitbox:hover .fcb-storage-card { + transform: translateY(-2px) !important; + background: #f0f4f8 !important; + box-shadow: var(--fcb-card-shadow-hover) !important; +} + +.dark .fcb-storage-hitbox:hover .fcb-storage-card { + background: #2f414a !important; +} + +@media (prefers-reduced-motion: reduce), (hover: none) { + .fcb-storage-hitbox:hover .fcb-storage-card { + transform: none !important; + } +} + @media (prefers-reduced-motion: reduce) { .fcb-storage-card { transition-duration: 0.01ms !important; } } diff --git a/tests/uiSystem.test.mjs b/tests/uiSystem.test.mjs index 4ea124d..ff8a503 100644 --- a/tests/uiSystem.test.mjs +++ b/tests/uiSystem.test.mjs @@ -119,3 +119,12 @@ test('storage detail cards animate visual properties without transitioning grid assert.ok(!/\ball\b/.test(transition)) for(const property of ['transform','box-shadow','background-color','border-color'])assert.ok(transition.includes(property)) }) + +test('storage card hover uses a stationary wrapper and disables movement for touch or reduced motion', async () => { + const {descriptor}=parse(readFileSync('src/views/manage/FileManageView.vue','utf8')) + const content=descriptor.template.content + assert.match(content,/v-for="item in detailStorageItems"[\s\S]*?class="fcb-storage-hitbox"[\s\S]*?s.content).join('\n') + assert.match(css,/\.fcb-storage-hitbox:hover\s+\.fcb-storage-card[\s\S]*?translateY\(-2px\)/) + assert.match(css,/@media \(prefers-reduced-motion: reduce\), \(hover: none\)/) +})