feat: scrolling at the top every route change
This commit is contained in:
parent
dace87887b
commit
f5468fe1b9
File diff suppressed because one or more lines are too long
@ -72,6 +72,11 @@ export default {
|
||||
this.$root.$on('updateSearchLoadingState', loading => {
|
||||
this.loading = loading
|
||||
})
|
||||
|
||||
this.$router.beforeEach((to, from, next) => {
|
||||
this.$refs.content.scrollTo(0, 0)
|
||||
next()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
handleContentScroll: debounce(async function () {
|
||||
|
@ -94,6 +94,7 @@ const router = new VueRouter({
|
||||
})
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
console.log('js before each')
|
||||
let getTracklistParams = null
|
||||
|
||||
switch (to.name) {
|
||||
|
Loading…
Reference in New Issue
Block a user