- Creator 版本:3.6.1
准备实现一个详情页卡片轮播的逻辑。点击下一步,然后到一定长度会删除第一个,在默认添加一个。
但发现一旦执行 removePageAtIndex 会导致不触发滚动动画,但数据是变化的。是因为更新时机的问题么?
尝试过一直 addPage 是有动画效果的。
this.PageViewNode.removePageAtIndex(0);
this.PageViewNode.addPage(detailNode);
this.scheduleOnce(() => {
this.PageViewNode.scrollToPage(this.pageViewIndex, 0.3);
}, 0);