以3n 为单位进行循环
<template
v-for="(item, index) in Math.ceil(warnInfo.length / 3)"
:key="index + 'ca'"
>
<el-carousel-item>
<div
v-for="(data, k) in warnInfo.slice(index * 3, item * 3)"
:key="k"
>
<h3 class="tip" justify="center">{{ data }}</h3>
</div>
</el-carousel-item>
</template>
跑马灯效果