You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.7 KiB
56 lines
1.7 KiB
<import src="../common/template/icon.wxml" />
|
|
<wxs src="../common/utils.wxs" module="_" />
|
|
|
|
<view
|
|
wx:if="{{visible}}"
|
|
id="{{classPrefix}}"
|
|
class="{{classPrefix}} class {{prefix}}-class"
|
|
style="{{_._style([style, customStyle])}}"
|
|
>
|
|
<view
|
|
class="{{classPrefix}}__mask"
|
|
data-source="overlay"
|
|
bind:tap="onClose"
|
|
style="{{ 'background-color: ' + backgroundColor }}"
|
|
/>
|
|
<block wx:if="{{images && images.length}}">
|
|
<view slot="content" class="{{classPrefix}}__content">
|
|
<swiper
|
|
height="{{windowHeight * 2}}"
|
|
class="swiper"
|
|
autoplay="{{false}}"
|
|
current="{{currentSwiperIndex}}"
|
|
bindchange="onSwiperChange"
|
|
>
|
|
<swiper-item wx:for="{{images}}" wx:key="index" class="{{classPrefix}}__preview-image">
|
|
<t-image
|
|
t-class="t-image--external"
|
|
style="{{imagesShape[index].style}}"
|
|
mode="aspectFit"
|
|
lazy
|
|
src="{{item}}"
|
|
data-index="{{index}}"
|
|
class="{{classPrefix}}__image"
|
|
bindload="onImageLoadSuccess"
|
|
></t-image>
|
|
</swiper-item>
|
|
</swiper>
|
|
</view>
|
|
<view class="{{classPrefix}}__nav">
|
|
<view class="{{classPrefix}}__nav-close" catch:tap="onClose">
|
|
<slot name="close-btn" />
|
|
<template wx:if="{{_closeBtn}}" is="icon" data="{{ ..._closeBtn }}" />
|
|
</view>
|
|
|
|
<view wx:if="{{showIndex}}" class="{{classPrefix}}__nav-index">
|
|
{{currentSwiperIndex + 1}}/{{images.length}}
|
|
</view>
|
|
|
|
<view class="{{classPrefix}}__nav-delete" bind:tap="onDelete">
|
|
<slot name="delete-btn" />
|
|
<template is="icon" data="{{ ..._deleteBtn }}" />
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</view>
|