From 8e3f3890e93d097df4be744648b9ac404d20a558 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期四, 23 四月 2026 17:58:50 +0800
Subject: [PATCH] 2026.4.23

---
 miniprogram_npm/tdesign-miniprogram/image-viewer/image-viewer.wxml |   63 -------------------------------
 1 files changed, 1 insertions(+), 62 deletions(-)

diff --git a/miniprogram_npm/tdesign-miniprogram/image-viewer/image-viewer.wxml b/miniprogram_npm/tdesign-miniprogram/image-viewer/image-viewer.wxml
index d5954a7..a92422a 100644
--- a/miniprogram_npm/tdesign-miniprogram/image-viewer/image-viewer.wxml
+++ b/miniprogram_npm/tdesign-miniprogram/image-viewer/image-viewer.wxml
@@ -1,62 +1 @@
-<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, '--td-image-viewer-top: ' + maskTop + 'px'])}}"
-  aria-modal="{{true}}"
-  aria-role="dialog"
-  aria-label="鍥剧墖鏌ョ湅鍣�"
->
-  <view
-    class="{{classPrefix}}__mask"
-    data-source="overlay"
-    bind:tap="onClose"
-    style="{{ 'background-color: ' + backgroundColor }}"
-    aria-role="button"
-    aria-label="鍏抽棴"
-  />
-  <block wx:if="{{images && images.length}}">
-    <view class="{{classPrefix}}__content">
-      <swiper
-        class="swiper"
-        style="{{swiperStyle[currentSwiperIndex].style}}"
-        autoplay="{{false}}"
-        current="{{currentSwiperIndex}}"
-        bindchange="onSwiperChange"
-        bindtap="onClose"
-        tabindex="0"
-      >
-        <swiper-item wx:for="{{images}}" wx:key="index" class="{{classPrefix}}__preview-image">
-          <t-image
-            t-class="t-image--external"
-            style="{{imagesStyle[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" aria-role="button" aria-label="鍏抽棴">
-        <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" aria-role="button" aria-label="鍒犻櫎">
-        <slot name="delete-btn" />
-        <template is="icon" data="{{ ..._deleteBtn }}" />
-      </view>
-    </view>
-  </block>
-</view>
+<import src="../common/template/icon.wxml"/><wxs src="../common/utils.wxs" module="_"/><wxs src="./image-viewer.wxs" module="utils"/><view wx:if="{{visible}}" id="{{classPrefix}}" class="{{classPrefix}} class {{prefix}}-class" style="{{_._style([style, customStyle, '--td-image-viewer-top: ' + maskTop + 'px'])}}" aria-modal="{{true}}" aria-role="dialog" aria-label="鍥剧墖鏌ョ湅鍣�" catchtouchmove="true"><view class="{{classPrefix}}__mask" data-source="overlay" bind:tap="onClose" style="{{_._style([backgroundColor && '--td-image-viewer-mask-bg-color: ' + backgroundColor])}}" aria-role="button" aria-label="鍏抽棴"/><block wx:if="{{images && images.length}}"><view class="{{classPrefix}}__content"><swiper class="swiper" style="{{swiperStyle[currentSwiperIndex].style}}" autoplay="{{false}}" current="{{currentSwiperIndex}}" bindchange="onSwiperChange" bindtap="onClose" tabindex="0"><swiper-item wx:for="{{images}}" wx:key="index" class="{{classPrefix}}__preview-image"><t-image wx:if="{{!lazy || utils.shouldLoadImage(index, currentSwiperIndex, loadedImageIndexes) }}" t-class="{{prefix}}-image--external" class="{{classPrefix}}__image" style="{{imagesStyle[index].style || ''}}" data-index="{{index}}" src="{{item}}" mode="{{imageProps && imageProps.mode || 'aspectFit'}}" lazy="{{imageProps && imageProps.lazy || false}}" loading="{{imageProps && imageProps.loading || 'default'}}" shape="{{imageProps && imageProps.shape || 'square'}}" webp="{{imageProps && imageProps.webp || false}}" show-menu-by-longpress="{{imageProps && imageProps.showMenuByLongpress || false}}" bindload="onImageLoadSuccess"></t-image></swiper-item></swiper></view><view class="{{classPrefix}}__nav"><view class="{{classPrefix}}__nav-close" catch:tap="onClose" aria-role="button" aria-label="鍏抽棴"><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" aria-role="button" aria-label="鍒犻櫎"><slot name="delete-btn"/><template is="icon" data="{{ ..._deleteBtn }}"/></view></view></block></view>
\ No newline at end of file

--
Gitblit v1.9.3