parent
896f2df03c
commit
0291699dbe
After Width: | Height: | Size: 273 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 716 KiB |
After Width: | Height: | Size: 907 KiB |
@ -0,0 +1,35 @@
|
|||||||
|
<template>
|
||||||
|
<el-carousel
|
||||||
|
indicator-position="outside"
|
||||||
|
:interval="3000"
|
||||||
|
arrow="always"
|
||||||
|
height="640px">
|
||||||
|
<el-carousel-item v-for="(item, index) in carouseData" :key="index">
|
||||||
|
<img :src="item" alt="轮播图">
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
const carouseData = [
|
||||||
|
'/sf1.png',
|
||||||
|
'/sf2.png',
|
||||||
|
'/sf3.png',
|
||||||
|
'/sf4.png',
|
||||||
|
'/sf5.png',
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-carousel__item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center; /* 水平居中 */
|
||||||
|
align-items: center; /* 垂直居中 */
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
|
display: block; /* 确保图片显示 */
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue