提交 e82d861d 作者: 方治民

合并分支 '3.x' 到 'main'

3.x

查看合并请求 !39
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
}, },
}) })
const src = ref() const visibleSrc = ref()
const hashCacheKey = ref() const hashCacheKey = ref()
onMounted(async () => { onMounted(async () => {
await tryCache() await tryCache()
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
// #endif // #endif
} }
src.value = url visibleSrc.value = url
} }
const hasError = ref(false) const hasError = ref(false)
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
} }
hasError.value = true hasError.value = true
src.value = props.src visibleSrc.value = props.src
// 清除缓存 // 清除缓存
hashCacheKey.value && uni.removeStorageSync(hashCacheKey.value) hashCacheKey.value && uni.removeStorageSync(hashCacheKey.value)
console.warn('CacheImage cache error') console.warn('CacheImage cache error')
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
:height="props.height" :height="props.height"
:radius="props.radius" :radius="props.radius"
:background="props.background" :background="props.background"
:src="src" :src="visibleSrc"
@error="onError" @error="onError"
> >
<slot></slot> <slot></slot>
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
}, },
}) })
const size = computed(() => `${props.size}rpx`) const isize = computed(() => `${props.size}rpx`)
const color = computed(() => props.color) const icolor = computed(() => props.color)
</script> </script>
<template> <template>
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<style lang="less" scoped> <style lang="less" scoped>
.icon { .icon {
width: v-bind(size); width: v-bind(isize);
height: v-bind(size); height: v-bind(isize);
color: v-bind(color); color: v-bind(icolor);
} }
</style> </style>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
}) })
// 生成预览容器高度 // 生成预览容器高度
const height = computed(() => `${props.height}rpx`) const iheight = computed(() => `${props.height}rpx`)
// 分离图片和视频资源地址 // 分离图片和视频资源地址
const images = computed(() => props.assets.filter((item) => isImage(item.url))) const images = computed(() => props.assets.filter((item) => isImage(item.url)))
const videos = computed(() => props.assets.filter((item) => isVideo(item.url))) const videos = computed(() => props.assets.filter((item) => isVideo(item.url)))
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
position: relative; position: relative;
:deep(.fui-lazyload__img) { :deep(.fui-lazyload__img) {
height: v-bind(height) !important; height: v-bind(iheight) !important;
} }
.icon-wrap { .icon-wrap {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论