老师,你好,我想问一下关于移出分组的过渡动画的实现问题。
我的代码在***移动到其他分组***的时候过渡动画显示没有问题,但是在***移出分组***的时候却显示不出动画,可能是由于什么原因导致的呢?(功能是可以实现的,但是就是这个过渡的效果没出来)
代码如下:
moveOutFromGroup (group) {
this.setShelfList(this.shelfList.map(book => {
if (book.type === 2 && book.itemList) {
book.itemList = book.itemList.filter(subBook => !subBook.selected)
}
return book
})).then(() => {
let list = removeAddFromShelf(this.shelfList)
list = [].concat(list, ...this.shelfSelected)
list = appendAddToShelf(list)
list = computeId(list)
this.setShelfList(list).then(() => {
this.simpleToast(this.$t('shelf.moveBookOutSuccess'))
this.onComplete()
})
})
布局代码如下:
.shelf-item-wrapper {
flex: 0 0 33.33%;
width: 33.33%;
padding: px2rem(15);
box-sizing: border-box;
&.list-leave-active {
display: none;
}
&.list-move {
transition: transform 0.5s;
}
}
gitee的地址是这个:https://gitee.com/bobonpy/ebook2
麻烦了