fix(用例脑图): 首次点击收起用例失败修复

--bug=1045715 --user=白奇 【测试用例】脑图模式-模块下新建用例、用例步骤-首次点击收起用例失败 https://www.tapd.cn/55049933/s/1577763
This commit is contained in:
baiqi 2024-09-12 15:16:24 +08:00 committed by Craftsman
parent 3cad440eb5
commit ac010366c4
1 changed files with 9 additions and 2 deletions

View File

@ -295,7 +295,9 @@
});
const activeExtraKey = ref<'baseInfo' | 'attachment' | 'comments' | 'bug'>('baseInfo');
const isContentChanging = ref(false);
function handleMinderNodeContentChange(node?: MinderJsonNode) {
isContentChanging.value = true;
if (extraVisible.value) {
//
activeCase.value = {
@ -304,6 +306,9 @@
};
}
handleContentChange(node);
setTimeout(() => {
isContentChanging.value = false;
}, 300); // 300ms debounce 300ms
}
const fileList = ref<MsFileItem[]>([]);
@ -637,8 +642,10 @@
toggleDetail(true);
}
//
expendNodeAndChildren(node);
node.layout();
if (!isContentChanging.value) {
expendNodeAndChildren(node);
node.layout();
}
} else if (data?.resource?.includes(moduleTag) && data.count > 0 && data.isLoaded !== true) {
//
await initNodeCases(node);