From 324949dbc294bd641ed4b87aad0a54dbcc6f2520 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 18 Jun 2025 18:11:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=95=86=E5=9F=8E=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E5=9B=BE=E8=A3=85=E4=BF=AE=E7=BB=84=E4=BB=B6=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sheep/components/s-image-banner/s-image-banner.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sheep/components/s-image-banner/s-image-banner.vue b/sheep/components/s-image-banner/s-image-banner.vue index 478e7af..a4e9a01 100644 --- a/sheep/components/s-image-banner/s-image-banner.vue +++ b/sheep/components/s-image-banner/s-image-banner.vue @@ -9,6 +9,7 @@ :autoplay="data.autoplay" :interval="data.interval * 1000" :mode="data.type" + :height="px2rpx(data.height)" /> @@ -28,6 +29,12 @@ }, }); + function px2rpx(px) { + //计算比例 + let scale = uni.upx2px(100)/100; + return px/scale + } + const imgList = computed(() => props.data.items.map((item) => { const src = item.type === 'img' ? item.imgUrl : item.videoUrl;