<view class="am-swipe {{swiping ? 'am-swiping' : ''}} {{className}}">
  <block a:if="{{right.length > 0}}">
    <view class="am-swipe-right am-swipe-right-{{$id}}">
      <block a:for="{{right}}">
        <view
          class="am-swipe-btn am-swipe-btn-{{item.type}}"
          onTap="onItemClick"
          data-index="{{index}}"
          key="swipe-item-{{index}}"
        >
          {{item.text}}
        </view>
      </block>
    </view>
  </block>
  <view
    class="am-swipe-content"
    onTap="onSwipeTap"
    onTouchStart="onSwipeStart"
    onTouchEnd="onSwipeEnd"
    catchTouchMove="onSwipeMove"
    data-type="content"
    style="-webkit-transform: translateX({{leftPos}}px); transform: translateX({{leftPos}}px);"
  >
    <slot />
  </view>
</view>