Browse Source

更新版本升级

wangxy 1 tháng trước cách đây
mục cha
commit
2f410a526e
1 tập tin đã thay đổi với 25 bổ sung3 xóa
  1. 25 3
      components/dialog/tipMiddleDialog.vue

+ 25 - 3
components/dialog/tipMiddleDialog.vue

@@ -14,6 +14,20 @@
 		</view>
 	 </view>
 	</uni-popup>
+
+  <!-- 自定义预览弹窗 -->
+  <uni-popup ref="previewPopup" type="center" :safe-area="false" :is-mask-click="false">
+    <view class="custom-preview" style="position: relative">
+      <image
+          src="/static/images/login/ggg.gif"
+          mode="widthFix"
+          class="preview-image"
+      />
+      <view class="close-btn" @click="handleCloseImg" style="position: absolute;top: -30px;right: 5px">
+        <text class="close-icon" style="color:#fff">关闭</text>
+      </view>
+    </view>
+  </uni-popup>
 </template>
 
 <script setup>
@@ -42,6 +56,9 @@
     }
 	});
 	const tipMiddlePopup = ref(null); // 索引
+
+  const previewPopup = ref(null)
+
 	const $emit = defineEmits(['confirm-btn'])
 	// 打开弹窗
 	function handleShow() {
@@ -59,10 +76,15 @@
     }
 	}
 
+  function handleCloseImg() {
+    previewPopup.value.close()
+  }
+
   function handleShowImage() {
-    uni.previewImage({
-      urls: ['/static/images/login/ggg.gif'],
-    });
+    previewPopup.value.open()
+    // uni.previewImage({
+    //   urls: ['/static/images/login/ggg.gif'],
+    // });
   }
 
 	defineExpose({