masonry.wxml
637 字节
<view class="masonry-list">
<view class="masonry-list-left" style="{{ 'margin-right:' + intervalWidth }}">
<view id="left-col-inner">
<block wx:for="{{items}}" wx:key="{{item.id}}">
<masonry-item wx:if="{{item.columnPosition === 'left'}}" item="{{item}}" class="masonry-item1"></masonry-item>
</block>
</view>
</view>
<view class="masonry-list-right">
<view id="right-col-inner">
<block wx:for="{{items}}" wx:key="{{item.id}}">
<masonry-item wx:if="{{item.columnPosition === 'right'}}" item="{{item}}" class="masonry-item2"></masonry-item>
</block>
</view>
</view>
</view>