fix(接口测试): 修复一键收起失效问题

--bug=1011328 --user=赵勇 【接口测试】场景一键收起,没有完全收起 https://www.tapd.cn/55049933/s/1119798
This commit is contained in:
fit2-zhao 2022-03-17 12:45:39 +08:00 committed by fit2-zhao
parent 3bdf9d700c
commit fe548f7aa9
2 changed files with 7 additions and 2 deletions

View File

@ -460,6 +460,10 @@ export default {
this.isSave = false;
this.removeTab(targetName);
}
if (t) {
t.splice(0, 1);
t = undefined;
}
},
removeTab(targetName) {
this.tabs = this.tabs.filter(tab => tab.name !== targetName);

View File

@ -195,7 +195,7 @@
highlight-current
@node-expand="nodeExpand"
@node-collapse="nodeCollapse"
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" draggable ref="stepTree">
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" draggable :key="reloadKey" ref="stepTree">
<span class="custom-tree-node father" slot-scope="{node, data}" style="width: 96%">
<!-- 步骤组件-->
<ms-component-config
@ -437,6 +437,7 @@ export default {
onSampleError: true,
newOnSampleError: true,
showConfigButtonWithOutPermission: false,
reloadKey: "",
props: {
label: "label",
children: "hashTree"
@ -1703,7 +1704,7 @@ export default {
this.expandedStatus = false;
this.expandedNode = [];
this.changeNodeStatus(this.scenarioDefinition);
this.showHide();
this.reloadKey = getUUID();
},
stepStatus(nodes) {
for (let i in nodes) {