fix(测试跟踪): 脑图将用例拖入未加载用例的模块,会产生数据丢失
--bug=1028740 --user=陈建星 【测试跟踪】github#26157,功能用例-》脑图-》修改脑图,移动字节点到其他节点时,展示错误 https://www.tapd.cn/55049933/s/1403966
This commit is contained in:
parent
1d6e4ef4a8
commit
d707d090bc
|
@ -62,7 +62,7 @@ import {
|
|||
isModuleNodeData,
|
||||
listenBeforeExecCommand,
|
||||
listenDblclick,
|
||||
listenNodeSelected,
|
||||
listenNodeSelected, loadNode,
|
||||
loadSelectNodes,
|
||||
priorityDisableCheck,
|
||||
tagEditCheck,
|
||||
|
@ -276,6 +276,11 @@ export default {
|
|||
// 设置完标签后,优先级显示有问题,重新设置下
|
||||
setTimeout(() => setPriorityView(true, 'P'), 100);
|
||||
}
|
||||
|
||||
if ('movetoparent' === even.commandName) {
|
||||
// 拖入的节点尚未加载时,加载节点
|
||||
loadNode(even.commandArgs[1], this.getParam(), getTestCasesForMinder, null, getMinderExtraNode);
|
||||
}
|
||||
});
|
||||
|
||||
addIssueHotBox(this);
|
||||
|
|
|
@ -411,7 +411,7 @@ function _appendExtraNodes(parent, data) {
|
|||
}
|
||||
|
||||
/**
|
||||
* 去掉已有节点
|
||||
* 清理子节点中的tmp节点
|
||||
* @param parent
|
||||
*/
|
||||
function clearChildren(node) {
|
||||
|
@ -419,7 +419,7 @@ function clearChildren(node) {
|
|||
if (children) {
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
let item = children[i];
|
||||
if (item.data.type !== 'node') {
|
||||
if (item.data.type === 'tmp') {
|
||||
window.minder.removeNode(item);
|
||||
i--;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue