提交 e82d861d 作者: 方治民

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

3.x

查看合并请求 !39
......@@ -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>
......
......@@ -14,8 +14,8 @@
},
})
const size = computed(() => `${props.size}rpx`)
const color = computed(() => props.color)
const isize = computed(() => `${props.size}rpx`)
const icolor = computed(() => props.color)
</script>
<template>
......@@ -24,8 +24,8 @@
<style lang="less" scoped>
.icon {
width: v-bind(size);
height: v-bind(size);
color: v-bind(color);
width: v-bind(isize);
height: v-bind(isize);
color: v-bind(icolor);
}
</style>
......@@ -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 videos = computed(() => props.assets.filter((item) => isVideo(item.url)))
......@@ -133,7 +133,7 @@
position: relative;
:deep(.fui-lazyload__img) {
height: v-bind(height) !important;
height: v-bind(iheight) !important;
}
.icon-wrap {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论