diff --git a/src/components/SwipeCards/index.vue b/src/components/SwipeCards/index.vue index db6c08a..4bb8745 100644 --- a/src/components/SwipeCards/index.vue +++ b/src/components/SwipeCards/index.vue @@ -1,13 +1,13 @@ @@ -163,15 +204,18 @@ function cardStyle(index, card) { height: 320px; display: flex; justify-content: center; - padding: 6px 6px 12px 6px; + padding: 6px 0 12px; + will-change: transform; // 启用硬件加速 } .card { position: absolute; - width: calc(100% - 12px); + width: 100%; height: calc(100% - 30px); border-radius: 20px; box-shadow: 0 8px 8px rgba(0, 0, 0, 0.08); background: #fff; + will-change: transform, opacity; // 启用硬件加速 + backface-visibility: hidden; // 减少重绘 } diff --git a/src/pages/index/components/module/DetailCardGoodsContentList/index.vue b/src/pages/index/components/module/DetailCardGoodsContentList/index.vue index 6e76781..d23a370 100644 --- a/src/pages/index/components/module/DetailCardGoodsContentList/index.vue +++ b/src/pages/index/components/module/DetailCardGoodsContentList/index.vue @@ -6,7 +6,7 @@