Skip to content

Commit e66def8

Browse files
committed
disable slide transition for non-pagination navigations
1 parent ed76f83 commit e66def8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/ItemList.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default {
4040
const isInitialRender = !this.$root._isMounted
4141
return {
4242
loading: false,
43-
transition: 'slide-left',
43+
transition: 'slide-up',
4444
// if this is the initial render, directly render with the store state
4545
// otherwise this is a page switch, start with blank and wait for data load.
4646
// we need these local state so that we can precisely control the timing
@@ -96,7 +96,9 @@ export default {
9696
this.$router.replace(`/${this.type}/1`)
9797
return
9898
}
99-
this.transition = to > from ? 'slide-left' : 'slide-right'
99+
this.transition = from === -1
100+
? null
101+
: to > from ? 'slide-left' : 'slide-right'
100102
this.displayedPage = to
101103
this.displayedItems = this.$store.getters.activeItems
102104
this.loading = false

0 commit comments

Comments
 (0)