Skip to content

Commit dbd2c85

Browse files
authored
feat: ✨ 修复Img组件在错误状态下可以预览的问题
1 parent 3836309 commit dbd2c85

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • src/uni_modules/wot-design-uni/components/wd-img

src/uni_modules/wot-design-uni/components/wd-img/wd-img.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<!--
2+
* @Author: 810505339
3+
* @Date: 2024-09-25 11:30:46
4+
* @LastEditors: 810505339
5+
* @LastEditTime: 2025-01-09 11:37:45
6+
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-img\wd-img.vue
7+
* 记得注释
8+
-->
19
<template>
210
<view :class="rootClass" @click="handleClick" :style="rootStyle">
311
<image
@@ -63,7 +71,7 @@ function handleError(event: any) {
6371
emit('error', event)
6472
}
6573
function handleClick(event: MouseEvent) {
66-
if (props.enablePreview && props.src) {
74+
if (props.enablePreview && props.src && status.value == 'success') {
6775
uni.previewImage({
6876
urls: [props.src]
6977
})

0 commit comments

Comments
 (0)