computed: {
elTable: function() {
return document.getElementsByClassName('layout-content')[0]
},
},
data() {
return {
scrollPosition: 0,
}
},
activated() {
this.$nextTick(() => {
this.elTable.scrollTop = this.scrollPosition
})
},
beforeRouteLeave(to, from, next) {
this.scrollPosition = this.elTable.scrollTop
next()
},