小程序嵌套处理

<view class="selectsize_content">
<block wx:for="{{properties}}" wx:key="item" wx:for-index="id">
<view class="content_title">{{item.name}}</view>
<view class='content_list'>
<block wx:for="{{item.childsCurGoods}}" wx:key="items">
<text class="{{ item.isSelect?'active':''}}" data-select-index="{{id}}" data-attr-index="{{index}}" data-content="{{properties}}" bindtap='clickMenu'>{{item.name}}</text>
</block>
</view>
</block>
</view>


作者:zlf_j
链接:https://www.jianshu.com/p/b86a995d24fd
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

css

.selectsize_content{
width:100%;
height:450rpx;
border-bottom:2rpx solid lightgray;
}
.content_title{
line-height:100rpx;
margin-left:20rpx;
}
.content_list{
line-height:100rpx;
margin-left:20rpx;
}
.content_list text{
padding:20rpx;
border:2rpx solid lightgray;
margin-right:20rpx;
}
// 商品属性选中后
.active{
border-color:red;
color:red;
}



作者:zlf_j
链接:https://www.jianshu.com/p/b86a995d24fd
來源:简书
简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

猜你喜欢

转载自www.cnblogs.com/wcLT/p/9253084.html