This commit is contained in:
Riyyi
2025-04-05 16:37:40 +02:00
parent 551478d15a
commit 60aeb0a9af
+9 -5
View File
@@ -43,17 +43,21 @@ const props = defineProps({
type: String, type: String,
default: "lazy" // eager, lazy default: "lazy" // eager, lazy
}, },
}) });
const refinedSrc = computed(() => { const refinedSrc = computed(() => {
console.log(props.src);
if (props.src?.startsWith("/") && !props.src.startsWith("//")) { if (props.src?.startsWith("/") && !props.src.startsWith("//")) {
const _base = withLeadingSlash(withTrailingSlash(useRuntimeConfig().app.baseURL)) const _base = withLeadingSlash(withTrailingSlash(useRuntimeConfig().app.baseURL));
console.log("base: " + _base);
if (_base !== "/" && !props.src.startsWith(_base)) { if (_base !== "/" && !props.src.startsWith(_base)) {
return joinURL(_base, props.src) console.log("@@@: " + joinURL(_base, props.src));
return joinURL(_base, props.src);
} }
} }
return props.src console.log("<><><><>");
}) return props.src;
});
</script> </script>
<!-- <!--