uniapp 瀑布流

编程入门 行业动态 更新时间:2024-10-07 02:27:29

uniapp <a href=https://www.elefans.com/category/jswz/34/1762263.html style=瀑布流"/>

uniapp 瀑布流

组件

<template><view class="shop-cell"><image v-if="index == 0" class="shopItem" src="../../static/logo.png"></image><view class="flex"><view else class="shopItemDefault"><image class="shopimg" src="../../static/shuijiao.jpg"></image><view class="cell-title">淘气城堡</view></view></view></view>
</template><script>
export default {props: {shopListItem: '',index: ''}
};
</script><style>
.shopItem {width: 44.85vw;height: 44.85vw;background: #ffffff;border-radius: 6upx;
}
.shopItemDefault {width: 44.85vw;height: 52.332vw;background: #ffffff;border-radius: 6upx;
}
.shopimg {width: 44.85vw;height: 29.904vw;
}
.shop-cell{margin-top: 2.67vw;border-radius: 6upx;overflow: hidden;
}
.cell-title{font-size: 3.738vw;padding: 4vw 2.67vw 0 2.67vw;
}
</style>

使用 

<!-- 列表start --><view class="flex justify-between shopListbox"><view class="left"><view v-if="item.id % 2 != 0" v-for="(item, index) in shopList" :key="index"><ShopList :shopListItem="item" :index="index"></ShopList></view></view><view class="right"><view v-if="item.id % 2 == 0" v-for="(item, index) in shopList" :key="index"><ShopList :shopListItem="item" :index="index"></ShopList></view></view><!-- <view v-for="(item, index) in shopList" :key="index"></view> --></view><!-- 列表end -->

 

更多推荐

uniapp 瀑布流

本文发布于:2024-02-06 15:48:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1749699.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:瀑布   uniapp

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!