u-swiper.wxml
2.8 KB
<view class="u-swiper-wrap data-v-a5b2d580" style="{{'border-radius:'+(borderRadius+'rpx')+';'}}"><swiper style="{{'height:'+(height+'rpx')+';'+('background-color:'+(bgColor)+';')}}" current="{{elCurrent}}" interval="{{interval}}" circular="{{circular}}" duration="{{duration}}" autoplay="{{autoplay}}" previous-margin="{{effect3d?effect3dPreviousMargin+'rpx':'0'}}" next-margin="{{effect3d?effect3dPreviousMargin+'rpx':'0'}}" data-event-opts="{{[['change',[['change',['$event']]]],['animationfinish',[['animationfinish',['$event']]]]]}}" bindchange="__e" bindanimationfinish="__e" class="data-v-a5b2d580"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><swiper-item class="u-swiper-item data-v-a5b2d580"><view data-event-opts="{{[['tap',[['listClick',[index]]]]]}}" class="{{['u-list-image-wrap','data-v-a5b2d580',uCurrent!=index?'u-list-scale':'']}}" style="{{'border-radius:'+(borderRadius+'rpx')+';'+('transform:'+(effect3d&&uCurrent!=index?'scaleY(0.9)':'scaleY(1)')+';')+('margin:'+(effect3d&&uCurrent!=index?'0 20rpx':0)+';')}}" catchtap="__e"><image class="u-swiper-image data-v-a5b2d580" src="{{item.$orig[name]||item.$orig}}" mode="{{imgMode}}"></image><block wx:if="{{title&&item.$orig.title}}"><view class="u-swiper-title u-line-1 data-v-a5b2d580" style="{{item.s0}}">{{''+item.$orig.title+''}}</view></block></view></swiper-item></block></swiper><view class="u-swiper-indicator data-v-a5b2d580" style="{{'top:'+(indicatorPos=='topLeft'||indicatorPos=='topCenter'||indicatorPos=='topRight'?'12rpx':'auto')+';'+('bottom:'+(indicatorPos=='bottomLeft'||indicatorPos=='bottomCenter'||indicatorPos=='bottomRight'?'12rpx':'auto')+';')+('justify-content:'+(justifyContent)+';')+('padding:'+('0 '+(effect3d?'74rpx':'24rpx'))+';')}}"><block wx:if="{{mode=='rect'}}"><block class="data-v-a5b2d580"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['u-indicator-item-rect','data-v-a5b2d580',(index==uCurrent)?'u-indicator-item-rect-active':'']}}"></view></block></block></block><block wx:if="{{mode=='dot'}}"><block class="data-v-a5b2d580"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['u-indicator-item-dot','data-v-a5b2d580',(index==uCurrent)?'u-indicator-item-dot-active':'']}}"></view></block></block></block><block wx:if="{{mode=='round'}}"><block class="data-v-a5b2d580"><block wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view class="{{['u-indicator-item-round','data-v-a5b2d580',(index==uCurrent)?'u-indicator-item-round-active':'']}}"></view></block></block></block><block wx:if="{{mode=='number'}}"><block class="data-v-a5b2d580"><view class="u-indicator-item-number data-v-a5b2d580">{{uCurrent+1+"/"+list.length}}</view></block></block></view></view>