Applied NuxtImg to pages and components

This commit is contained in:
2024-12-07 23:29:20 +09:00
parent 3ddcf5fa5e
commit e821b258c3
13 changed files with 264 additions and 170 deletions

View File

@@ -2,10 +2,13 @@
import type { PageTopProperty } from "~/utils/types/pageTop";
const property = defineProps<PageTopProperty>();
const backgroundImageOptimizer = useBackgroundImageOptimization();
backgroundImageOptimizer.backgroundImageStyles.value = property.imagePath;
</script>
<template>
<div :style="{ backgroundImage: `url(${property.imagePath})` }">
<div :style="backgroundImageOptimizer.backgroundImageStyles.value">
{{ property.text }}
</div>
</template>