fix: Carousel is abnormal when carousel is page
This commit is contained in:
@ -353,7 +353,7 @@ export default {
|
|||||||
let rows = rowsData.slice(animationIndex)
|
let rows = rowsData.slice(animationIndex)
|
||||||
rows.push(...rowsData.slice(0, 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)
|
this.heights = new Array(rowLength).fill(avgHeight)
|
||||||
|
|
||||||
await new Promise(resolve => setTimeout(resolve, 300))
|
await new Promise(resolve => setTimeout(resolve, 300))
|
||||||
|
@ -208,7 +208,7 @@ export default {
|
|||||||
let rows = rowsData.slice(animationIndex)
|
let rows = rowsData.slice(animationIndex)
|
||||||
rows.push(...rowsData.slice(0, 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)
|
this.heights = new Array(rowLength).fill(avgHeight)
|
||||||
|
|
||||||
await new Promise(resolve => setTimeout(resolve, 300))
|
await new Promise(resolve => setTimeout(resolve, 300))
|
||||||
|
Reference in New Issue
Block a user