mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(接口测试): 修复接口测试循环下子请求可展开bug
This commit is contained in:
parent
fd263b3755
commit
c3b5e598bd
@ -240,16 +240,16 @@
|
||||
* 处理步骤展开折叠
|
||||
*/
|
||||
function handleStepExpand(data: MsTreeExpandedData) {
|
||||
const realStep = findNodeByKey<ScenarioItemType>(steps.value, data.node?.stepId, 'stepId');
|
||||
const isNotAllowExpand =
|
||||
data.node?.children && data.node?.children.length && showApiType.value.includes(data.node?.stepType);
|
||||
if (isNotAllowExpand && data.node && data.node.children) {
|
||||
data.node.stepChildren = cloneDeep(data.node.children);
|
||||
data.node.children = [];
|
||||
} else {
|
||||
const realStep = findNodeByKey<ScenarioItemType>(steps.value, data.node?.stepId, 'stepId');
|
||||
if (isNotAllowExpand && data.node && data.node.children?.length) {
|
||||
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
Block a user