<t-popup visible="{{show}}" placement="bottom" bind:visible-change="handlePopupHide">
  <view class="popup-container">
    <view class="popup-close" bindtap="handlePopupHide">
      <t-icon name="close" size="36rpx" />
    </view>
    <view class="popup-sku-header">
      <t-image t-class="popup-sku-header__img" src="{{imgSrc}}" />
      <view class="popup-sku-header__goods-info">
        <view class="popup-sku__goods-name">{{title}}</view>
        <view class="goods-price-container">
          <price price="{{price * 100}}" wr-class="popup-sku__price-num" symbol-class="popup-sku__price-symbol" />
        </view>
        <!-- 已选规格 -->
        <view class="popup-sku__selected-spec">
          <view>选择：</view>
          <view wx:for="{{attrList}}" wx:key="specId">
            <view class="popup-sku__selected-item" wx:for="{{item.values}}" wx:for-item="selectedItem" wx:if="{{selectedItem.status === 'picked'}}" wx:key="_id">
              {{selectedItem.value}}
            </view>
          </view>
        </view>
      </view>
    </view>
    <view class="popup-sku-body">
      <view class="popup-sku-group-container">
        <view class="popup-sku-row" wx:for="{{attrList}}" wx:key="specId">
          <view class="popup-sku-row__title">{{item.name}}</view>
          <block wx:for="{{item.values}}" wx:for-item="valuesItem" wx:for-index="valuesIndex" wx:key="_id">
            <view class="popup-sku-row__item {{valuesItem.status === 'picked' ? 'popup-sku-row__item--active' : ''}} {{valuesItem.status === 'disabled' ? 'disabled-sku-selected' : ''}}" data-attr-name-index="{{index}}" data-attr-value-index="{{valuesIndex}}" bindtap="clickAttrValue">
              {{valuesItem.value}}
            </view>
          </block>
        </view>
      </view>
      <view class="popup-sku-stepper-stock">
        <view class="popup-sku-stepper-container">
          <view class="popup-sku__stepper-title">
            购买数量
            <view class="limit-text" wx:if="{{limitBuyInfo}}">({{limitBuyInfo}})</view>
          </view>
          <t-stepper value="{{value}}" min="{{1}}" max="{{max}}" theme="filled" bind:change="handleBuyNumChange" bind:blur="onBlur" />
        </view>
      </view>
    </view>
    <view wx:if="{{outOperateStatus !== 'no'}}" class="single-confirm-btn {{pickedSku == null ? 'disabled' : ''}}" bindtap="specsConfirm">
      确定
    </view>
    <view class="popup-sku-actions flex flex-between {{!isStock ? 'popup-sku-disabled' : ''}}" wx:if="{{outOperateStatus === 'no'}}">
      <view class="sku-operate">
        <view class="selected-sku-btn sku-operate-addCart {{pickedSku == null ? 'disabled' : ''}}" bindtap="addCart">
          加入购物车
        </view>
      </view>
      <view class="sku-operate">
        <view class="selected-sku-btn sku-operate-buyNow  {{pickedSku == null ? 'disabled' : ''}}" bindtap="buyNow">
          立即购买
        </view>
      </view>
    </view>
    <slot name="bottomSlot" />
  </view>
</t-popup>
<t-toast id="t-toast" />