From 48145f787eda81815f653ad21161a60e89b6a303 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期三, 13 十一月 2024 16:41:32 +0800
Subject: [PATCH] 2024.11.13

---
 component/mygallery/mygallery.wxml |   73 +++++++++++++++++++++++++++++++-----
 1 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/component/mygallery/mygallery.wxml b/component/mygallery/mygallery.wxml
index 0be9eaf..9d89b88 100644
--- a/component/mygallery/mygallery.wxml
+++ b/component/mygallery/mygallery.wxml
@@ -1,18 +1,39 @@
 <!--component/mygallery/mygallery.wxml-->
 <page-container show="{{show}}">
   <view class="fyui-gallery {{show ? 'fyui-gallery_show' : ''}} {{extClass}}">
-    <mp-icon wx:if="{{showRemark}}" class="fyui-gallery__close" icon="close" color="white" size="26" bindtap="hideGallery"></mp-icon>
-    <view class="fyui-gallery__info" wx:if="{{true}}">{{current+1}} / {{currentImgs.length}}</view>
-    <swiper class="fyui-gallery__img__wrp" bindtap="toggle" indicator-dots="{{false}}" bindanimationfinish="change" current="{{current}}" autoplay="{{false}}" duration="{{500}}">
+    <mp-icon
+      wx:if="{{showRemark}}"
+      class="fyui-gallery__close"
+      icon="close"
+      color="white"
+      size="26"
+      bindtap="hideGallery"
+    ></mp-icon>
+    <view class="fyui-gallery__info" wx:if="{{true}}"
+      >{{current+1}} / {{currentImgs.length}}</view
+    >
+    <swiper
+      class="fyui-gallery__img__wrp"
+      bindtap="toggle"
+      indicator-dots="{{false}}"
+      bindanimationfinish="change"
+      current="{{current}}"
+      autoplay="{{false}}"
+      duration="{{500}}"
+    >
       <block wx:for="{{currentImgs}}" wx:key="index">
         <swiper-item>
-          <image mode="aspectFit" src="{{item}}" class="fyui-gallery__img"
-            style="transform: translate({{translateX}}px, {{translateY}}px) scale({{scale}}) rotate({{rotate}}deg);" 
+          <image
+            mode="aspectFit"
+            src="{{item}}"
+            class="fyui-gallery__img"
+            style="transform: translate({{translateX}}px, {{translateY}}px) scale({{scale}}) rotate({{rotate}}deg);"
             bindtouchstart="touchStart"
             bindtouchmove="{{endScale <= 1 ? 'touchMove' : ''}}"
             capture-catch:touchmove="{{endScale > 1 ? 'touchMove' : undefined}}"
             bindtouchend="touchEnd"
-            ></image>
+            show-menu-by-longpress="{{true}}"
+          ></image>
         </swiper-item>
       </block>
     </swiper>
@@ -20,14 +41,44 @@
       <view class="fyui-gallery__title">{{title}}</view>
       <view class="fyui-gallery__des">{{remark}}</view>
     </view>
-    <scroll-view wx:if="{{showRemark}}" class="swiper-tab" scroll-into-view="item{{current > 2 ? current - 2 : 0}}" scroll-x="true" show-scrollbar="true" scroll-with-animation="true">
+    <scroll-view
+      wx:if="{{showRemark}}"
+      class="swiper-tab"
+      scroll-into-view="item{{current > 2 ? current - 2 : 0}}"
+      scroll-x="true"
+      show-scrollbar="true"
+      scroll-with-animation="true"
+    >
       <block wx:for="{{currentImgs}}" wx:key="i">
-        <image id="item{{index}}" src="{{item}}" class="swiper-tab-list {{current == index ? 'on' : ''}}" data-current="{{index}}" bindtap="swichNav" mode="aspectFit"></image>
+        <image
+          id="item{{index}}"
+          src="{{item}}"
+          class="swiper-tab-list {{current == index ? 'on' : ''}}"
+          data-current="{{index}}"
+          bindtap="swichNav"
+          mode="aspectFit"
+        ></image>
       </block>
     </scroll-view>
     <view wx:if="{{showRemark}}" class="fyui-gallery__tool">
-      <mp-icon mode="filled" class="fyui-gallery__tool__rotate" icon="refresh" color="white" size="26" data-clockwise="{{true}}" bindtap="rotateImg"></mp-icon>
-      <mp-icon mode="filled" class="fyui-gallery__tool__rotate left" icon="refresh" color="white" size="26" data-clockwise="{{false}}" bindtap="rotateImg"></mp-icon>
+      <mp-icon
+        mode="filled"
+        class="fyui-gallery__tool__rotate"
+        icon="refresh"
+        color="white"
+        size="26"
+        data-clockwise="{{true}}"
+        bindtap="rotateImg"
+      ></mp-icon>
+      <mp-icon
+        mode="filled"
+        class="fyui-gallery__tool__rotate left"
+        icon="refresh"
+        color="white"
+        size="26"
+        data-clockwise="{{false}}"
+        bindtap="rotateImg"
+      ></mp-icon>
     </view>
   </view>
-</page-container>
\ No newline at end of file
+</page-container>

--
Gitblit v1.9.3