Swiper使用push只会显示最后一条数据。
Abierto
- Lenguaje dominante
- Vue
- Estrellas
- 17.5k
- Forks
- 3.6k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
swiper的list数据如果使用push进行赋值将只会显示最后一条数据,失去原本的功能。需要使用直接赋值。
let temp = [];
getCarouselList().then(res => {
res.data.contentCarouselList.forEach(element => {
temp.push({
url: "javascript:",
img: element.picUrl,
title: element.contentTitle
});
});
this.carouselList = temp;
});
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.