From 21e64ba6a6bdfef7ea1274211803edbefdfa3eef Mon Sep 17 00:00:00 2001 From: duanshuwen Date: Sat, 8 Nov 2025 12:45:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=9B=B8=E5=85=B3=E5=95=86=E5=93=81?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SwipeCards/index.vue | 487 +++++++++++------- .../DetailCardGoodsContentList/index.vue | 170 +----- 2 files changed, 309 insertions(+), 348 deletions(-) diff --git a/src/components/SwipeCards/index.vue b/src/components/SwipeCards/index.vue index 4bb8745..0d604af 100644 --- a/src/components/SwipeCards/index.vue +++ b/src/components/SwipeCards/index.vue @@ -1,221 +1,348 @@ - + +.inner-card { + width: 100%; + height: 100%; + background: #fff; + border-radius: 20px; + flex-direction: column; +} + +/* 商品大图部分:撑满除相册外的空间 */ +.goods-image-wrapper { + position: relative; + width: 100%; + aspect-ratio: 335 / 200; + overflow: hidden; +} + +.goods-image { + width: 100%; + height: 100%; + object-fit: cover; +} + +.goods-title { + position: absolute; + inset: 0; + padding: 12px; + background: linear-gradient( + 180deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 0.6) 100% + ); + display: flex; + flex-direction: column; + justify-content: flex-end; +} + +.goods-text { + color: #fff; + font-size: 14px; + font-weight: 500; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.card-price-fu { + color: #fff; + font-size: 11px; + font-weight: normal; +} + +.card-price { + color: #fff; + font-size: 14px; + font-weight: bold; +} + +.card-unit { + font-size: 11px; + color: #fff; + font-weight: normal; + margin-left: 2px; +} + +.album-row { + display: flex; + justify-content: space-between; + padding: 12px; + box-sizing: border-box; + flex-shrink: 0; + aspect-ratio: 335 / 84; +} + +.album-item { + width: calc((100% - 24px) / 3); + height: 100%; + border-radius: 10px; + overflow: hidden; + background: #f5f5f5; +} + +.album-image-wrapper { + position: relative; + width: 100%; + height: 100%; +} + +.album-image { + width: 100%; + height: 100%; + object-fit: cover; +} + +.album-title { + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding: 8px; + background: linear-gradient( + 180deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 0.6) 100% + ); + color: #fff; + font-size: 14px; + font-weight: 500; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + \ No newline at end of file diff --git a/src/pages/index/components/module/DetailCardGoodsContentList/index.vue b/src/pages/index/components/module/DetailCardGoodsContentList/index.vue index d23a370..effbc8f 100644 --- a/src/pages/index/components/module/DetailCardGoodsContentList/index.vue +++ b/src/pages/index/components/module/DetailCardGoodsContentList/index.vue @@ -2,57 +2,12 @@ - - - +