mirror of
https://github.com/nuxt/ui.git
synced 2026-09-14 19:51:10 +08:00
29 lines
653 B
Vue
29 lines
653 B
Vue
<script setup lang="ts">
|
|
defineProps<{
|
|
prevIcon?: string
|
|
nextIcon?: string
|
|
}>()
|
|
|
|
const items = [
|
|
'https://picsum.photos/640/640?random=1',
|
|
'https://picsum.photos/640/640?random=2',
|
|
'https://picsum.photos/640/640?random=3',
|
|
'https://picsum.photos/640/640?random=4',
|
|
'https://picsum.photos/640/640?random=5',
|
|
'https://picsum.photos/640/640?random=6'
|
|
]
|
|
</script>
|
|
|
|
<template>
|
|
<UCarousel
|
|
v-slot="{ item }"
|
|
arrows
|
|
:prev-icon="prevIcon"
|
|
:next-icon="nextIcon"
|
|
:items="items"
|
|
class="w-full max-w-xs mx-auto"
|
|
>
|
|
<img :src="item" width="320" height="320" class="rounded-lg" loading="lazy">
|
|
</UCarousel>
|
|
</template>
|