Appearance
轮播图
在有限空间内,循环播放同一类型的图片、文字等内容
示例代码
<script setup>
import { ESCarousel, ESContent } from "earthsdk-ui";
const list = ['1', '2', '3', '4', '5', '6']
</script>
<template>
<div style="width: 100%; height: 500px" class="display">
<ESCarousel :width="500" :height="250" primary-color="red">
<ESContent v-for="item in list" :key="item">
<div
style="width: 100%; height: 100%; background: grey"
class="display"
>
{{ item }}
</div>
</ESContent>
</ESCarousel>
</div>
</template>
<style scoped>
.display {
display: flex;
justify-content: center;
align-items: center;
}
</style>
Attributes
| 属性名 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| visibleIndicator | 指示器 | boolean | true |
| visibleArrow | 指示箭头 | boolean | true |
| auto | 自动轮播 | boolean | true |
| autoTime | 自动轮播时间 | number | 5000 |
EarthSDK UI