From 7b7e926f8ae79ed76b0c8377bcb3ca2bc1cae2dc Mon Sep 17 00:00:00 2001 From: zhoulinf <2507241354@qq.com> Date: Wed, 2 Apr 2025 13:23:18 +0800 Subject: [PATCH] =?UTF-8?q?story#5314=20=E7=85=A7=E7=89=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=AF=94=E4=BE=8B=E5=A4=B1=E8=B0=83=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E9=9C=80=E8=A6=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/secondHandCar/forSale.vue | 2 ++ src/views/secondHandCar/indexList.vue | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/views/secondHandCar/forSale.vue b/src/views/secondHandCar/forSale.vue index 1d5925e1..7f544e8c 100644 --- a/src/views/secondHandCar/forSale.vue +++ b/src/views/secondHandCar/forSale.vue @@ -379,6 +379,8 @@ export default { .swipeImg{ width: 100%; height: 100%; + object-fit: cover; /* 保持比例填充容器,裁剪多余部分 */ + object-position: center; /* 居中显示 */ } ::v-deep .el-carousel__button { height: 0.15rem !important; diff --git a/src/views/secondHandCar/indexList.vue b/src/views/secondHandCar/indexList.vue index 4dd8f3ac..13a0fe10 100644 --- a/src/views/secondHandCar/indexList.vue +++ b/src/views/secondHandCar/indexList.vue @@ -518,6 +518,10 @@ export default { letter-spacing: 5px; background-color: #6C81CD; } + .img { + object-fit: cover; /* 保持比例填充容器,裁剪多余部分 */ + object-position: center; /* 居中显示 */ + } } .right{ .title{