fix(接口测试): 测试计划报告分享目录点击失效

--bug=1014579 --user=陈建星 【测试跟踪】github#15439 测试计划报告分享报告后,点击左侧目录的链接,页面跳转失败 https://www.tapd.cn/55049933/s/1194409
This commit is contained in:
chenjianxing 2022-07-05 10:10:50 +08:00 committed by f2c-ci-robot[bot]
parent 061e6db160
commit 5a759268f7
1 changed files with 2 additions and 6 deletions

View File

@ -59,12 +59,8 @@ export default {
}, },
watch: { watch: {
activeName() { activeName() {
let url = new URL(window.location.href); let target = document.getElementById(this.activeName);
if (this.isTemplate) { target.parentNode.parentNode.parentNode.scrollTop = target.offsetTop - 100;
window.location.href = window.location.href.split('#')[0] + '#' + this.activeName;
} else {
window.location.href = url.origin + '#' + this.activeName;
}
}, },
overviewEnable() { overviewEnable() {
this.setData(); this.setData();