categoryList.wxml 983 Bytes
<view style='background-color: #ffffff'>

  <view wx:if='{{filterList.length > 0}}' class='item' bindtap='clearCategroy'>
    <text class='name'>全部品类</text>
    <image wx:if='{{allSelect}}' class='checked' src='./images/checked.png'></image>
  </view>

  <block wx:for="{{filterList}}" wx:key="unique">

    <view class='item' bindtap='selectItem' data-index="{{index}}">
      <text class='name'>{{item.itemName}}</text>
      <image class='expend' src='{{item.isExpand ? "./images/upIc@2x.png" : "./images/downIc@2x.png"}}'></image>
    </view>

    <block wx:if='{{item.isExpand}}' wx:for="{{item.childItems}}" wx:key="unique" wx:for-item='childItems'>
      <view class='item' style='background-color: #f0f0f0' bindtap='selectChildItem' data-item="{{childItems}}">
        <text class='name'>{{childItems.itemName}}</text>
        <image wx:if='{{childItems.isSelected}}' class='checked' src='./images/checked.png'></image>
      </view>
    </block>

  </block>

</view>