<view class="ant-terms {{buttonsFixed ? 'ant-terms-fixed' : ''}} {{className}}">
  <slot name="button-top"></slot>
  <view>
    <slot name="button-group-top">
      <view
        a:if="{{terms.length && type !== 'read'}}"
        class="ant-terms-protocol"
      >
        <block a:if="{{type === 'check'}}">
          <ant-popover
            className="ant-terms-checkbox-tips"
            placement="top-left"
            autoAdjustOverflow="{{false}}"
            visible="{{checkboxTipsVisible}}"
            content="{{checkboxTipsText}}"
            showMask="{{false}}"
            style="display: inline-block"
          >
            <ant-checkbox
              checked="{{checked}}"
              onChange="onCheckChange"
            ></ant-checkbox>
          </ant-popover>
          <text
            a:if="{{termPrefix}}"
            onTap="onTermPrefixTap"
            class="ant-terms-protocol-text"
          >{{termPrefix}}</text>
        </block>
        <text
          a:if="{{type !== 'check' && termPrefix}}"
          class="ant-terms-protocol-text"
        >{{termPrefix}}</text>
        <text
          class="ant-terms-protocol-item"
          onTap="onTermTap"
          data-item="{{item}}"
          data-index="{{index}}"
          a:for="{{terms}}"
          a:for-index="index"
          a:for-item="item"
          key="{{item['key']}}"
        >{{item.name}}</text>
        <text
          a:if="{{termSuffix}}"
          class="ant-terms-protocol-text"
        >{{termSuffix}}</text>
      </view>
      <block a:if="{{terms.length && type === 'read'}}">
        <slot name="read-content"></slot>
        <view class="ant-terms-read-shadow">
          <view class="ant-terms-read-shadow-total">
            <slot name="read-total">
              共{{terms.length}}份
            </slot>
          </view>
        </view>
        <swiper
          className="ant-terms-read-protocol-swiper"
          current="{{mixin.value}}"
          autoplay="{{false}}"
          vertical="{{false}}"
          circular="{{false}}"
          previousMargin="35px"
          nextMargin="35px"
          onChange="onReadChange"
        >
          <block
            a:for="{{terms}}"
            a:for-index="index"
            a:for-item="item"
            key="{{item['key']}}"
          >
            <swiper-item className="ant-terms-read-protocol-swiper-item">
              <view
                class="ant-terms-read-protocol"
                onTap="onReadSwiperTap"
                data-item="{{item}}"
                data-index="{{index}}"
              >
                <slot
                  name="read-term-item"
                  item="{{item}}"
                  index="{{index}}"
                >
                  <text
                    a:if="{{termPrefix}}"
                    class="ant-terms-read-protocol-text"
                  >{{termPrefix}}</text>
                  <text
                    class="ant-terms-read-protocol-item"
                    onTap="onTermTap"
                    data-item="{{item}}"
                    data-index="{{index}}"
                  >{{item.name}}</text>
                  <text
                    a:if="{{termSuffix}}"
                    class="ant-terms-read-protocol-text"
                  >{{termSuffix}}</text>
                </slot>
              </view>
            </swiper-item>
          </block>
        </swiper>
      </block>
    </slot>
    <view
      a:if="{{buttons.length}}"
      class="ant-terms-btn {{buttonsDirection === 'horizontal' ? 'ant-terms-btn-flex' : ''}}"
    >
      <slot name="prefix"></slot>
      <view
        class="ant-terms-btn-item {{buttonsDirection === 'horizontal' ? 'ant-terms-btn-item-flex' : ''}}"
        data-item="{{item}}"
        data-index="{{index}}"
        a:for="{{buttons}}"
        a:for-index="index"
        a:for-item="item"
        key="{{item['key']}}"
      >
        <slot
          name="button-left"
          index="{{index}}"
          item="{{item}}"
        ></slot>
        <ant-button
          data-index="{{index}}"
          data-item="{{item}}"
          onTap="onButtonTap"
          type="{{item.type || 'primary'}}"
          style="{{item.style || ''}}"
          inline="{{item.inline}}"
          size="{{item.size}}"
          aide="{{item.aide}}"
          loading="{{item.loading}}"
          disabled="{{item.disabled}}"
          icon="{{item.icon}}"
          activeClassName="{{item.activeClassName}}"
          className="{{buttons.length === 1 ? 'ant-terms-btn-single' : ''}} {{item.className}}"
        >
          <slot
            name="button-prefix"
            slot="prefix"
            index="{{index}}"
            item="{{item}}"
          ></slot>
          <slot
            name="button-content"
            index="{{index}}"
            item="{{item}}"
          >
            {{item.text}}
          </slot>
          {{countdownArr[index] ? '（' + countdownArr[index] + 's）' : ''}}
          <slot
            name="button-suffix"
            slot="suffix"
            index="{{index}}"
            item="{{item}}"
          ></slot>
        </ant-button>
        <slot
          name="button-right"
          index="{{index}}"
          item="{{item}}"
        ></slot>
      </view>
      <slot name="suffix"></slot>
    </view>
    <slot name="button-group-bottom"></slot>
    <!--默认插槽，内容区域-->
    <slot></slot>
    <ant-safe-area position="bottom"></ant-safe-area>
  </view>
</view>