<import-sjs name="h" from="./index.sjs"/>
<view class="tree-select-container">
  <view class="tree-select-menu">
    <view class="scroll">
      <view class="menu-items">
        <view
          onTap="onMenuTap"
          a:for="{{ menus }}"
          data-index="{{ index }}"
          class="menu-item{{ h.selectClass(index, activeIndex) }}"
        >
          <text number-of-lines="2">{{ item.name }}</text>
        </view>
      </view>
    </view>
  </view>
  <view class="tree-select-content">
    <view class="scroll">
      <view class="tree-select-second">
        <tree-item
          item="{{ item }}"
          onTapOpen="onTapOpen"
          onTapItem="onTapItem"
          lastCache="{{ lastCache }}"
          key="{{ item.departmentId }}"
          a:for="{{ cache[activeIndex] || [] }}"
        />
      </view>
    </view>
  </view>
</view>
