Skip to content

Commit

Permalink
feat: ✨ 修复Img组件在错误状态下可以预览的问题 (Moonofweisheng#820)
Browse files Browse the repository at this point in the history
  • Loading branch information
810505339 committed Jan 9, 2025
1 parent 834cd8e commit cdff06e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/uni_modules/wot-design-uni/components/wd-img/wd-img.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<!--
* @Author: 810505339
* @Date: 2024-09-25 11:30:46
* @LastEditors: 810505339
* @LastEditTime: 2025-01-09 11:37:45
* @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-img\wd-img.vue
* 记得注释
-->
<template>
<view :class="rootClass" @click="handleClick" :style="rootStyle">
<image
Expand Down Expand Up @@ -63,7 +71,7 @@ function handleError(event: any) {
emit('error', event)
}
function handleClick(event: MouseEvent) {
if (props.enablePreview && props.src) {
if (props.enablePreview && props.src && status.value == 'success') {
uni.previewImage({
urls: [props.src]
})
Expand Down

0 comments on commit cdff06e

Please sign in to comment.