fix: Carousel is abnormal when carousel is page

This commit is contained in:
jiaming743 2020-08-05 14:19:23 +08:00
parent 16013c0aa3
commit be97afe8a9
2 changed files with 2 additions and 2 deletions

View File

@ -353,7 +353,7 @@ export default {
let rows = rowsData.slice(animationIndex)
rows.push(...rowsData.slice(0, animationIndex))
this.rows = rows.slice(0, rowNum + 1)
this.rows = rows.slice(0, carousel === 'page' ? rowNum * 2 : rowNum + 1)
this.heights = new Array(rowLength).fill(avgHeight)
await new Promise(resolve => setTimeout(resolve, 300))

View File

@ -208,7 +208,7 @@ export default {
let rows = rowsData.slice(animationIndex)
rows.push(...rowsData.slice(0, animationIndex))
this.rows = rows.slice(0, rowNum + 1)
this.rows = rows.slice(0, carousel === 'page' ? rowNum * 2 : rowNum + 1)
this.heights = new Array(rowLength).fill(avgHeight)
await new Promise(resolve => setTimeout(resolve, 300))