water_xcx/miniprogram_npm/tdesign-miniprogram/swiper/swiper.wxml

44 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<wxs src="./swiper.wxs" module="swiper" />
<!-- 支持传入height指定容器高度单位rpx -->
<view
id="swiper"
class="{{prefix}}-class {{classPrefix}}"
style="{{height?'height:'+height+'rpx':''}}"
>
<view
id="swiperContainer"
class="{{classPrefix}}__container {{inited? '{{prefix}}-in-animation' : '{{prefix}}-is-hidden'}}"
style="transition-duration: {{duration/1000}}s;transition-timing-function:{{easings.linear}};"
bindtouchstart="{{swiper.startDrag}}"
capture-catch:touchmove="{{swiper.onDrag}}"
bindtouchend="{{swiper.endDrag}}"
bindtouchcancel="{{swiper.endDrag}}"
offsetX="{{offsetX}}"
offsetY="{{offsetY}}"
width="{{_width}}"
height="{{_height}}"
direction="{{direction}}"
total="{{total}}"
currentInited="{{currentInited}}"
change:offsetX="{{swiper.changeOffsetX}}"
change:offsetY="{{swiper.changeOffsetY}}"
change:width="{{swiper.changeWidth}}"
change:height="{{swiper.changeHeight}}"
change:direction="{{swiper.changeDirection}}"
change:total="{{swiper.changeTotal}}"
change:currentInited="{{swiper.changeCurrentInited}}"
>
<slot />
</view>
<t-swiper-nav
id="swiperNav"
wx:if="{{_navigation}}"
type="{{_navigation.type}}"
minShowNum="{{_navigation.minShowNum}}"
hasNavBtn="{{_navigation.hasNavBtn}}"
bind:navBtnChange="onSwiperNavBtnChange"
/>
<!-- 同时支持插槽组合 -->
<slot name="nav" />
</view>