/waterfall-layout

微信小程序瀑布流组件

Primary LanguageJavaScriptMIT LicenseMIT

waterfall-layout

微信小程序瀑布流组件

用法

第一步:下载waterfall-layout组件源码到项目目录下;
第二步:在json文件中引入waterfall-layout组件;

{
  "navigationBarTitleText": "瀑布流组件",
  "usingComponents": {
    "waterfall": "../../components/waterfall-layout/waterfall",
    "waterfall-item": "../../components/waterfall-layout/waterfall-item"
  }
}

第三步:在wxml文件中使用;

<waterfall
  custom-class="waterfall-box"
  loading="{{updateLoading}}"
  isAllLoaded="{{isAllLoaded}}"
>
  <waterfall-item 
    custom-class="product-item-box"
    wx:for="{{products}}" 
    wx:key="index"
  >
    <view>
      业务代码
    </view>
  </waterfall-item>
</waterfall>