<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> 跑马灯效果
标签:单位,跑马灯,循环,3n,data,进行 From: https://www.cnblogs.com/yanlinyushan/p/16978659.html