fix(接口测试): 修复接口测试循环下子请求可展开bug
This commit is contained in:
parent
fd263b3755
commit
c3b5e598bd
|
@ -240,16 +240,16 @@
|
||||||
* 处理步骤展开折叠
|
* 处理步骤展开折叠
|
||||||
*/
|
*/
|
||||||
function handleStepExpand(data: MsTreeExpandedData) {
|
function handleStepExpand(data: MsTreeExpandedData) {
|
||||||
|
const realStep = findNodeByKey<ScenarioItemType>(steps.value, data.node?.stepId, 'stepId');
|
||||||
const isNotAllowExpand =
|
const isNotAllowExpand =
|
||||||
data.node?.children && data.node?.children.length && showApiType.value.includes(data.node?.stepType);
|
data.node?.children && data.node?.children.length && showApiType.value.includes(data.node?.stepType);
|
||||||
if (isNotAllowExpand && data.node && data.node.children) {
|
if (isNotAllowExpand && data.node && data.node.children?.length) {
|
||||||
data.node.stepChildren = cloneDeep(data.node.children);
|
|
||||||
data.node.children = [];
|
|
||||||
} else {
|
|
||||||
const realStep = findNodeByKey<ScenarioItemType>(steps.value, data.node?.stepId, 'stepId');
|
|
||||||
if (realStep) {
|
if (realStep) {
|
||||||
realStep.expanded = !realStep.expanded;
|
realStep.stepChildren = cloneDeep(realStep.children);
|
||||||
|
realStep.children = [];
|
||||||
}
|
}
|
||||||
|
} else if (realStep) {
|
||||||
|
realStep.expanded = !realStep.expanded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue