feat: 商城轮播图装修组件增加高度配置
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
:autoplay="data.autoplay"
|
||||
:interval="data.interval * 1000"
|
||||
:mode="data.type"
|
||||
:height="px2rpx(data.height)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user