Update scrollBehavior.js

This commit is contained in:
sakuya 2021-08-02 18:56:41 +08:00
parent 5c3bb39ff0
commit c97dde5a73
1 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,8 @@ export function afterEach(to){
if(!adminMain){return false}
nextTick(()=>{
var beforeRoute = store.state.viewTags.viewTags.filter(v => v.fullPath == to.fullPath)[0]
adminMain.scrollTop = beforeRoute.scrollTop || 0
if(beforeRoute){
adminMain.scrollTop = beforeRoute.scrollTop || 0
}
})
}