CN-484 交互优化(页面跳转定位):锚点定位
This commit is contained in:
@@ -77,7 +77,7 @@ export default {
|
||||
if (!this.$_.isEmpty(res.data.theme)) {
|
||||
localStorage.setItem(storageKey.theme, res.data.theme)
|
||||
}
|
||||
res.loginSuccessPath = this.loginSuccessPath
|
||||
res.loginSuccessPath = this.$route.query.redirect
|
||||
this.loginSuccess(res)
|
||||
localStorage.setItem(storageKey.username, this.username)
|
||||
} else if (res.code === 518005) {
|
||||
|
||||
@@ -89,6 +89,14 @@ export default {
|
||||
this.currentTab = this.detailTabs[0].id + ''
|
||||
}
|
||||
window.addEventListener('mousewheel', this.handleWholeScreen)
|
||||
|
||||
if (this.currentPath != wholeScreenRouterMapping.dns) {
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.gotoAnchor(this.$route.query.anchor)
|
||||
}, 200)
|
||||
})
|
||||
}
|
||||
},
|
||||
beforeMount () {
|
||||
window.removeEventListener('mousewheel', this.handleWholeScreen)
|
||||
@@ -237,6 +245,12 @@ export default {
|
||||
},
|
||||
groupParentCalcHeight (params) {
|
||||
this.$refs.panelChartList.groupParentCalcHeight(params.chart, params.childrenList)
|
||||
},
|
||||
gotoAnchor (id) {
|
||||
const anchor = document.getElementById(id)
|
||||
if (anchor) {
|
||||
anchor.scrollIntoView()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user