<wv-toast 
  id="slidepanel-toast" 
  slotWidth="{{calculatedWidth}}"
  showMask="{{showMask}}"
  bind:close="onClose">
  <view class="wv-slidepanel {{position}} {{theme? 'wv-theme ' + theme : ''}}" 
        catchtouchmove="catchTouchMove"
        style="--wv-slidepanel-height: {{calculatedHeight}}; --wv-slidepanel-width: {{calculatedWidth}}; --wv-border-radius: {{radius}};">
    
    <view class="wv-panel {{theme? 'wv-theme ' + theme : ''}}">
      <view class="wv-panel-header slide-panel-header" wx:if="{{showHeader}}">
        <view wx:if="{{closeIcon && closePosition === 'top-left'}}" 
              class="wv-slidepanel-close-btn {{closePosition}}" 
              bindtap="hide">
          <text class="wv-icon {{closeIcon}}"></text>
        </view>
        
        <view class="title slot-defaultable">
          <view class="slot"><slot name="header"></slot></view>
        </view>
        
        <view wx:if="{{closeIcon && closePosition === 'top-right'}}" 
              class="wv-slidepanel-close-btn {{closePosition}}" 
              bindtap="hide">
          <text class="wv-icon {{closeIcon}}"></text>
        </view>
      </view>
      
      <view class="slidepanel-content">
        <scroll-view 
          style="height: 100%;"
          scroll-y
        >
          <view class="wv-panel-body">
            <view class="slot-defaultable">
              <view class="slot"><slot></slot></view>
            </view>
          </view>

          <view>
            <view class="slot-defaultable">
              <view class="slot"><slot name="body-full"></slot></view>
            </view>
          </view>
        </scroll-view>
      </view>

      <view class="slide-panel-footer" wx:if="{{showFooter || (closeIcon && (closePosition === 'bottom-left' || closePosition === 'bottom-right'))}}">
        <view wx:if="{{closeIcon && closePosition === 'bottom-left'}}" 
              class="wv-slidepanel-close-btn {{closePosition}}" 
              bindtap="onCloseClick">
          <text class="wv-icon {{closeIcon}}"></text>
        </view>
        
        <view class="slot-defaultable">
          <view class="slot"><slot name="footer"></slot></view>
        </view>
        
        <view wx:if="{{closeIcon && closePosition === 'bottom-right'}}" 
              class="wv-slidepanel-close-btn {{closePosition}}" 
              bindtap="onCloseClick">
          <text class="wv-icon {{closeIcon}}"></text>
        </view>
      </view>
    </view>
  </view>
</wv-toast>

<!-- 边缘手势触发区域 -->
<view wx:if="{{enableEdgeGesture}}" 
      class="wv-slidepanel-gesture-area {{position}}" 
      style="--wv-gesture-area-width: {{gestureAreaWidth}}rpx;"
      bindtouchstart="onGestureTouchStart"
      bindtouchmove="onGestureTouchMove"
      bindtouchend="onGestureTouchEnd"
      bindtouchcancel="onGestureTouchEnd">
</view>
