fix(测试跟踪): 点击左侧树节点, 刷新多次并导致重定向问题
This commit is contained in:
parent
8647eaaecb
commit
57821854f6
|
@ -210,7 +210,8 @@ export default {
|
|||
if (this.isMinderMode) {
|
||||
this.forceSetCurrentKey();
|
||||
} else {
|
||||
this.setCurrentKey();
|
||||
// 这里模块点击后, 只设置当前节点Key, 并不刷新Tree
|
||||
this.justSetCurrentKey();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -245,6 +246,11 @@ export default {
|
|||
this.$refs.nodeTree.setCurrentKey(this.currentNode);
|
||||
}
|
||||
},
|
||||
justSetCurrentKey() {
|
||||
if (this.$refs.nodeTree) {
|
||||
this.$refs.nodeTree.justSetCurrentKey(this.currentNode.data.id)
|
||||
}
|
||||
},
|
||||
// 重新获取 currentNode ,因为脑图更新完之后可能存在 currentNode 过时的情况
|
||||
forceSetCurrentKey() {
|
||||
if (this.$refs.nodeTree && this.currentNode && this.currentNode.data) {
|
||||
|
|
|
@ -65,6 +65,9 @@ export default {
|
|||
if (this.$refs.publicNodeTree) {
|
||||
this.publicTreeNodes.forEach(firstLevel => {
|
||||
this.$refs.publicNodeTree.nodeExpand(firstLevel);
|
||||
if (this.$refs.publicNodeTree) {
|
||||
this.$refs.publicNodeTree.justSetCurrentKey(store.testCasePublicSelectNode.data.id);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue