mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-07 01:28:30 +08:00
feat: ✨ 修复Img组件在错误状态下可以预览的问题
This commit is contained in:
parent
38363097a5
commit
dbd2c85b83
@ -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>
|
<template>
|
||||||
<view :class="rootClass" @click="handleClick" :style="rootStyle">
|
<view :class="rootClass" @click="handleClick" :style="rootStyle">
|
||||||
<image
|
<image
|
||||||
@ -63,7 +71,7 @@ function handleError(event: any) {
|
|||||||
emit('error', event)
|
emit('error', event)
|
||||||
}
|
}
|
||||||
function handleClick(event: MouseEvent) {
|
function handleClick(event: MouseEvent) {
|
||||||
if (props.enablePreview && props.src) {
|
if (props.enablePreview && props.src && status.value == 'success') {
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: [props.src]
|
urls: [props.src]
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user