fix(测试计划): 修复执行脑图和评审脑图收起失败的缺陷

--bug=1047712 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001047712
This commit is contained in:
teukkk 2024-10-29 14:41:31 +08:00 committed by Craftsman
parent 662d78ed17
commit e73f6ae80c
2 changed files with 30 additions and 6 deletions

View File

@ -15,6 +15,7 @@
:more-menu-other-operation-list="canShowFloatMenu ? moreMenuOtherOperationList : []" :more-menu-other-operation-list="canShowFloatMenu ? moreMenuOtherOperationList : []"
:shortcut-list="['expand', 'enter']" :shortcut-list="['expand', 'enter']"
disabled disabled
@content-change="handleMinderNodeContentChange"
@node-select="handleNodeSelect" @node-select="handleNodeSelect"
@node-unselect="handleNodeUnselect" @node-unselect="handleNodeUnselect"
> >
@ -623,6 +624,14 @@
} }
} }
const isContentChanging = ref(false);
function handleMinderNodeContentChange() {
isContentChanging.value = true;
setTimeout(() => {
isContentChanging.value = false;
}, 300); // 300ms debounce 300ms
}
/** /**
* 处理节点选中 * 处理节点选中
* @param node 节点 * @param node 节点
@ -684,9 +693,12 @@
if (extraVisible.value) { if (extraVisible.value) {
toggleDetail(true); toggleDetail(true);
} }
// // contentChangeselectisContentChanging
expendNodeAndChildren(node); if (!isContentChanging.value) {
node.layout(); //
expendNodeAndChildren(node);
node.layout();
}
} else if (data?.resource?.includes(moduleTag) && data.count > 0 && data.isLoaded !== true) { } else if (data?.resource?.includes(moduleTag) && data.count > 0 && data.isLoaded !== true) {
// //
await initNodeCases(node); await initNodeCases(node);

View File

@ -15,6 +15,7 @@
:more-menu-other-operation-list="canShowFloatMenu && hasOperationPermission ? moreMenuOtherOperationList : []" :more-menu-other-operation-list="canShowFloatMenu && hasOperationPermission ? moreMenuOtherOperationList : []"
:shortcut-list="['expand', 'enter']" :shortcut-list="['expand', 'enter']"
disabled disabled
@content-change="handleMinderNodeContentChange"
@node-batch-select="handleNodeBatchSelect" @node-batch-select="handleNodeBatchSelect"
@node-select="handleNodeSelect" @node-select="handleNodeSelect"
@node-unselect="handleNodeUnselect" @node-unselect="handleNodeUnselect"
@ -897,6 +898,14 @@
}); });
} }
const isContentChanging = ref(false);
function handleMinderNodeContentChange() {
isContentChanging.value = true;
setTimeout(() => {
isContentChanging.value = false;
}, 300); // 300ms debounce 300ms
}
// //
async function handleNodeSelect(node: MinderJsonNode) { async function handleNodeSelect(node: MinderJsonNode) {
const { data } = node; const { data } = node;
@ -966,9 +975,12 @@
if (extraVisible.value) { if (extraVisible.value) {
toggleDetail(true); toggleDetail(true);
} }
// // contentChangeselectisContentChanging
expendNodeAndChildren(node); if (!isContentChanging.value) {
node.layout(); //
expendNodeAndChildren(node);
node.layout();
}
} else if (data && isModuleOrCollection(data)) { } else if (data && isModuleOrCollection(data)) {
// //
if (data.id !== 'NONE' && data.count > 0 && data.isLoaded !== true) { if (data.id !== 'NONE' && data.count > 0 && data.isLoaded !== true) {