Skip to content

Commit 69e01a3

Browse files
committed
docs: added example for nuxt layer with config
1 parent c0ac040 commit 69e01a3

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed
3.16 MB
Loading
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default defineNuxtConfig({
2+
image: {
3+
dir: './assets',
4+
},
5+
})

playground/pages/ipx-layers.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@
1717
@load="isLoadedLayer = true"
1818
/>
1919
<p>Received onLoad event: {{ isLoadedLayer }}</p>
20+
21+
<h1>Layer with dir config</h1>
22+
<nuxt-img
23+
src="/images/colors-layer-config.jpg"
24+
width="500"
25+
height="500"
26+
@load="isLoadedLayerWithConfig = true"
27+
/>
28+
<p>Received onLoad event: {{ isLoadedLayerWithConfig }}</p>
2029
</div>
2130
</template>
2231

@@ -25,4 +34,5 @@ import { ref } from '#imports'
2534
2635
const isLoadedRoot = ref(false)
2736
const isLoadedLayer = ref(false)
37+
const isLoadedLayerWithConfig = ref(false)
2838
</script>

0 commit comments

Comments
 (0)