From be97afe8a9e3d2860ae67203a25e7ea9517f2537 Mon Sep 17 00:00:00 2001 From: jiaming743 <743192023@qq.com> Date: Wed, 5 Aug 2020 14:19:23 +0800 Subject: [PATCH] fix: Carousel is abnormal when carousel is page --- src/components/scrollBoard/src/main.vue | 2 +- src/components/scrollRankingBoard/src/main.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/scrollBoard/src/main.vue b/src/components/scrollBoard/src/main.vue index 5fc93d1..d52ff12 100644 --- a/src/components/scrollBoard/src/main.vue +++ b/src/components/scrollBoard/src/main.vue @@ -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)) diff --git a/src/components/scrollRankingBoard/src/main.vue b/src/components/scrollRankingBoard/src/main.vue index f3d04cd..02149ed 100644 --- a/src/components/scrollRankingBoard/src/main.vue +++ b/src/components/scrollRankingBoard/src/main.vue @@ -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))