Appearance
Carousel 轮播图
轮播图
这是 Carousel
的基础例子
vue
<script setup lang="ts">
const sliders = [
{ pic: '/imgs/12.jpg', href: 'http' },
{ pic: '/imgs/12.jpg', href: 'http' },
{ pic: '/imgs/12.jpg', href: 'http' },
{ pic: '/imgs/12.jpg', href: 'http' },
]
</script>
<template>
<div class="carousel-demo">
<NpCarousel :sliders="sliders" />
<NpCarousel :sliders="sliders" auto-play />
</div>
</template>
<style scoped>
.carousel-demo {
display: flex;
flex-direction: column;
gap: 10px;
}
</style>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24