fix(测试计划): 修复执行脑图和评审脑图收起失败的缺陷
--bug=1047712 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001047712
This commit is contained in:
parent
662d78ed17
commit
e73f6ae80c
|
@ -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);
|
||||||
}
|
}
|
||||||
|
// 点击展开折叠,会先触发contentChange,再触发select,isContentChanging用来判断是点击展开折叠触发的选中还是点击节点触发的选中
|
||||||
|
if (!isContentChanging.value) {
|
||||||
// 用例下面所有节点都展开
|
// 用例下面所有节点都展开
|
||||||
expendNodeAndChildren(node);
|
expendNodeAndChildren(node);
|
||||||
node.layout();
|
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);
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
// 点击展开折叠,会先触发contentChange,再触发select,isContentChanging用来判断是点击展开折叠触发的选中还是点击节点触发的选中
|
||||||
|
if (!isContentChanging.value) {
|
||||||
// 用例下面所有节点都展开
|
// 用例下面所有节点都展开
|
||||||
expendNodeAndChildren(node);
|
expendNodeAndChildren(node);
|
||||||
node.layout();
|
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) {
|
||||||
|
|
Loading…
Reference in New Issue