<t-popup
  customStyle="{{ customStyle }}"
  bind:visible-change="visibleChange"
  visible="{{visible}}"
  zIndex="{{zIndex}}"
  placement="{{placement == 'right' ? 'right' : 'left'}}"
  showOverlay="{{showOverlay}}"
  destroyOnClose="{{destroyOnClose}}"
  closeOnOverlayClick="{{closeOnOverlayClick}}"
>
  <view class="{{classPrefix}}">
    <view wx:if="{{title}}" class="{{classPrefix}}__title">{{title}}</view>
    <scroll-view class="{{classPrefix}}__sidebar" scroll-y>
      <view
        class="{{classPrefix}}__sidebar-item"
        wx:for="{{items}}"
        wx:item="item"
        wx:key="index"
        data-item="{{item}}"
        data-index="{{index}}"
        bindtap="itemClick"
      >
        <view wx:if="{{item.icon}}" class="{{classPrefix}}__sidebar-item-icon">
          <t-icon name="{{item.icon}}" />
        </view>
        <view class="{{classPrefix}}__sidebar-item-title"> {{item.title}} </view>
      </view>
    </scroll-view>
    <view class="{{classPrefix}}__footer">
      <slot />
      <slot name="footer" />
    </view>
  </view>
</t-popup>
