🐛 fix: 固定存储卡片悬浮命中区域与移动行为

* 固定外层命中区域、内层负责位移及颜色阴影过渡,保持 2px 效果
* 为减少动画与触屏禁用位移,补充命中区域回归测试,83 项测试及构建通过
This commit is contained in:
orion committed 2026-10-29 17:22:34 +08:00
1 parent d903dc3f3f
commit 00bba28b5d
2 files changed
+37 -8

No files matched your search

+9
View File
@@ -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]*?<div\s+class="fcb-storage-card/)
const css=descriptor.styles.map(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\)/)
})