From 23bdbea2060c903a5f836653c47dee59ddd4be5f Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Fri, 31 Oct 2025 14:46:43 +0800
Subject: [PATCH] =?UTF-8?q?style(components):=20=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=E8=A7=86=E9=A2=91=E5=BC=B9=E7=AA=97=E5=92=8C=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
统一使用视窗单位替代固定像素值,提高响应式适配能力
移除冗余的平板设备轮播图样式和搜索框边距
优化推荐列表图片显示模式为aspectFill
---
pages/components/VideoPopup.vue | 2 +-
pages/index/home.vue | 49 ++++++++---------------------------------
2 files changed, 10 insertions(+), 41 deletions(-)
diff --git a/pages/components/VideoPopup.vue b/pages/components/VideoPopup.vue
index 11ca4b4..1265e9e 100644
--- a/pages/components/VideoPopup.vue
+++ b/pages/components/VideoPopup.vue
@@ -18,7 +18,7 @@
:show-fullscreen-btn="true"
:show-play-btn="true"
:show-center-play-btn="true"
- style="width: 100%; height: 400rpx; border-radius: 8rpx;"
+ style="width: 100%; height: 55vw; border-radius: 8rpx;"
@error="onVideoError"
@play="onVideoPlay"
@pause="onVideoPause"
diff --git a/pages/index/home.vue b/pages/index/home.vue
index c243cfd..2e14d9b 100644
--- a/pages/index/home.vue
+++ b/pages/index/home.vue
@@ -10,7 +10,7 @@
@@ -23,8 +23,8 @@
@@ -107,7 +107,7 @@
-
+
@@ -454,6 +454,8 @@ export default {
background: #fff;
min-height: 100vh;
padding-bottom: 80rpx;
+ // max-width: 750px;
+ // margin: 0 auto;
}
// 顶部搜索栏
@@ -474,38 +476,6 @@ export default {
margin: 20rpx;
border-radius: 12rpx;
overflow: hidden;
-
- // 平板设备的轮播图样式
- &.tablet-swiper {
- margin: 30rpx 0;
- border-radius: 16rpx;
-
- // 卡片式轮播的额外样式
- :deep(.uv-swiper) {
- .swiper-slide {
- transition: all 0.3s ease;
- transform-origin: center;
-
- // 非激活状态的卡片
- &:not(.swiper-slide-active) {
- transform: scale(0.9);
- opacity: 0.7;
- }
-
- // 激活状态的卡片
- &.swiper-slide-active {
- transform: scale(1);
- opacity: 1;
- z-index: 2;
- }
- }
-
- // 调整指示器位置
- .uv-swiper__indicator {
- bottom: -40rpx;
- }
- }
- }
}
// 内容区块
@@ -799,16 +769,15 @@ export default {
.recommend-item {
width: 100%;
margin-bottom: 48rpx;
- border-radius: 32rpx;
- overflow: hidden;
-
&:last-child {
margin-bottom: 0;
}
.recommend-image {
width: 100%;
- height: 200rpx;
+ height: 25vw;
+ // height: 30.6vw;
+ border-radius: 32rpx;
}
}
}