微信 小程序布局 水平菜单
<!-- 菜单列表部分 -->
<view class="wear-menu">
<view class='menu-box' wx:key="menu" wx:for="{{menuList}}" wx:for-index="index">
<view class="menu-img" bindtap="selectMenu" data-index="{{index}}" data-id="{{item.id}}">
<image src='{{item.img}}'></image>
</view>
<view class='menu-title'>
<text>{{item.title}}</text>
</view>
</view>
</view>
//-----------------------------------------------------
/* 菜单列表部分 ***********/
.wear-menu{
display: flex;
}
.menu-box{
width: 33.33%;
}
.menu-img{
width: 150rpx;
height: 150rpx;
border-radius: 50%;
overflow: hidden;
margin: 0 auto;
}
.menu-img image{
width: 100%;
height: 100%;
}
.menu-title{
text-align: center;
}
//---------------------------------------------------------------
// 菜单列表部分
menuList:[
{ id: 1, img:"../../imgs/index/wear_1.png",title:"今日专场"},
{ id: 1, img: "../../imgs/index/wear_1.png", title: "补货专区" },
{ id: 1,img: "../../imgs/index/wear_1.png", title: "特供专区" }
],