提交 3c893ebe 作者: 方治民

fix: 修复图片缓存组件变量定义冲突问题

上级 b0af0123
......@@ -32,7 +32,7 @@
},
})
const src = ref()
const visibleSrc = ref()
const hashCacheKey = ref()
onMounted(async () => {
await tryCache()
......@@ -93,7 +93,7 @@
// #endif
}
src.value = url
visibleSrc.value = url
}
const hasError = ref(false)
......@@ -103,7 +103,7 @@
}
hasError.value = true
src.value = props.src
visibleSrc.value = props.src
// 清除缓存
hashCacheKey.value && uni.removeStorageSync(hashCacheKey.value)
console.warn('CacheImage cache error')
......@@ -118,7 +118,7 @@
:height="props.height"
:radius="props.radius"
:background="props.background"
:src="src"
:src="visibleSrc"
@error="onError"
>
<slot></slot>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论