🍱 缓存

This commit is contained in:
目棃
2025-03-05 20:19:25 +08:00
parent 26f670fae3
commit 3cead7eda6
5 changed files with 39 additions and 14 deletions

View File

@@ -33,6 +33,10 @@ const localUrl = ref<string>();
onMounted(async () => {
if (!props.src) return;
if (!props.src.startsWith("http")) {
localUrl.value = props.src;
return;
}
const link = props.ori ? props.src : appStore.getImageUrl(props.src);
localUrl.value = await saveImgLocal(link);
});