mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-03 12:39:12 +08:00
fix(脑图): 修复切换模块和进入节点多选节点的缺陷
This commit is contained in:
parent
279384539d
commit
fcadf129e1
@ -105,6 +105,7 @@
|
||||
import MsMinderEditor from '@/components/pure/ms-minder-editor/minderEditor.vue';
|
||||
import type { MinderJson, MinderJsonNode, MinderJsonNodeData } from '@/components/pure/ms-minder-editor/props';
|
||||
import {
|
||||
clearSelectedNodes,
|
||||
createNode,
|
||||
expendNodeAndChildren,
|
||||
handleRenderNode,
|
||||
@ -219,6 +220,7 @@
|
||||
},
|
||||
};
|
||||
importJson.value.treePath = [];
|
||||
clearSelectedNodes();
|
||||
window.minder.importJson(importJson.value);
|
||||
if (props.moduleId !== 'all') {
|
||||
// 携带具体的模块 ID 加载时,进入该模块内
|
||||
|
@ -77,7 +77,11 @@
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
import MsMinderEditor from '@/components/pure/ms-minder-editor/minderEditor.vue';
|
||||
import type { MinderJson, MinderJsonNode, MinderJsonNodeData } from '@/components/pure/ms-minder-editor/props';
|
||||
import { expendNodeAndChildren, setPriorityView } from '@/components/pure/ms-minder-editor/script/tool/utils';
|
||||
import {
|
||||
clearSelectedNodes,
|
||||
expendNodeAndChildren,
|
||||
setPriorityView,
|
||||
} from '@/components/pure/ms-minder-editor/script/tool/utils';
|
||||
import { MsFileItem } from '@/components/pure/ms-upload/types';
|
||||
import attachment from './attachment.vue';
|
||||
import baseInfo from './basInfo.vue';
|
||||
@ -207,11 +211,7 @@
|
||||
},
|
||||
};
|
||||
importJson.value.treePath = [];
|
||||
const currentSelectedNodes: MinderJsonNode[] = window.minder.getSelectedNodes();
|
||||
if (currentSelectedNodes && currentSelectedNodes.length > 0) {
|
||||
// 重置选中状态
|
||||
window.minder.toggleSelect(currentSelectedNodes);
|
||||
}
|
||||
clearSelectedNodes();
|
||||
window.minder.importJson(importJson.value);
|
||||
if (props.moduleId !== 'all') {
|
||||
// 携带具体的模块 ID 加载时,进入该模块内
|
||||
|
@ -166,6 +166,7 @@
|
||||
import MsMinderEditor from '@/components/pure/ms-minder-editor/minderEditor.vue';
|
||||
import type { MinderJson, MinderJsonNode, MinderJsonNodeData } from '@/components/pure/ms-minder-editor/props';
|
||||
import {
|
||||
clearSelectedNodes,
|
||||
createNode,
|
||||
expendNodeAndChildren,
|
||||
handleRenderNode,
|
||||
@ -284,6 +285,7 @@
|
||||
},
|
||||
};
|
||||
importJson.value.treePath = [];
|
||||
clearSelectedNodes();
|
||||
window.minder.importJson(importJson.value);
|
||||
if (props.activeModule !== 'all') {
|
||||
// 携带具体的模块 ID 加载时,进入该模块内
|
||||
|
@ -232,3 +232,11 @@ export function renderSubNodes(parentNode: MinderJsonNode, children?: MinderJson
|
||||
}) || []
|
||||
);
|
||||
}
|
||||
|
||||
// 清空选中状态
|
||||
export function clearSelectedNodes() {
|
||||
const currentSelectedNodes: MinderJsonNode[] = window.minder.getSelectedNodes();
|
||||
if (currentSelectedNodes && currentSelectedNodes.length > 0) {
|
||||
window.minder.toggleSelect(currentSelectedNodes);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user