From e446ad2b38d89342ac33f0230cb896f74e21cc46 Mon Sep 17 00:00:00 2001 From: dzq Date: Mon, 16 Jun 2025 15:35:59 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BA=A7=E5=93=81=E5=88=97=E8=A1=A8):=20?= =?UTF-8?q?=E4=B8=BA=E5=BA=97=E9=93=BA=E5=88=97=E8=A1=A8=E9=A1=B9=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=B0=81=E9=9D=A2=E5=9B=BE=E7=89=87=E5=B9=B6=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在店铺列表项中添加封面图片显示功能,当没有封面图时使用默认图片。同时调整了列表项的布局样式,将高度改为自适应并移除内边距,使封面图片能够完整显示。 --- src/pages/cabinet/index.vue | 24 +++++++++++++++--------- src/pages/product/ProductList.vue | 12 +++++++++--- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/pages/cabinet/index.vue b/src/pages/cabinet/index.vue index f635771..6132628 100644 --- a/src/pages/cabinet/index.vue +++ b/src/pages/cabinet/index.vue @@ -6,11 +6,12 @@
-
- -
{{ shop.shopName }}
-
-
+ +
+ +
{{ shop.shopName }}
+
+
@@ -341,19 +342,25 @@ onBeforeUnmount(() => { } .shop-item { - height: 60px !important; - padding: 12px; + height: auto !important; + padding: 0; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); transition: transform 0.2s; + .shop-cover-img { + width: 100%; + height: 80px; + object-fit: cover; + } + .shop-info { display: flex; align-items: center; justify-content: start; - height: 100%; + padding: 12px; } .shop-name { @@ -366,7 +373,6 @@ onBeforeUnmount(() => { display: flex; align-items: center; justify-content: center; - height: 100%; } } } diff --git a/src/pages/product/ProductList.vue b/src/pages/product/ProductList.vue index 48ccaff..ce53893 100644 --- a/src/pages/product/ProductList.vue +++ b/src/pages/product/ProductList.vue @@ -220,6 +220,7 @@ async function handleAb98Bind() {
+
{{ shop.shopName }}
@@ -579,8 +580,8 @@ async function handleAb98Bind() { } .shop-item { - height: 60px !important; - padding: 12px; + height: auto !important; + padding: 0; background: white; border-radius: 8px; overflow: hidden; @@ -591,7 +592,12 @@ async function handleAb98Bind() { display: flex; align-items: center; justify-content: start; - height: 100%; + padding: 12px; + } + .shop-cover-img { + width: 100%; + height: 80px; + object-fit: cover; } .shop-name {