fix(接口测试): 修复引用场景步骤能添加同级步骤问题

This commit is contained in:
fit2-zhao 2022-11-01 12:03:51 +08:00 committed by fit2-zhao
parent 6434c84110
commit 5e0c92f1f6
2 changed files with 6 additions and 1 deletions

View File

@ -1172,6 +1172,11 @@ export default {
}
},
addComponent(type, plugin) {
if (this.selectedNode && this.selectedNode.parent
&& this.selectedNode.parent.data && this.selectedNode.parent.data.disabled) {
this.$warning(this.$t('api_test.scenario.scenario_warning'));
return;
}
setComponent(type, this, plugin);
},
nodeClick(data, node) {

View File

@ -234,7 +234,7 @@ export default {
}
}
if (this.scenario && this.scenario.hashTree && this.node.expanded) {
this.scenario.disabled = true;
this.scenario.disabled = (this.scenario.id && this.scenario.referenced === 'REF');
this.recursive(this.scenario.hashTree, this.scenario.projectId, (this.scenario.id && this.scenario.referenced === 'REF'));
}
this.reload();