fix(脑图): 切换模块和进入节点多选节点问题修复
This commit is contained in:
parent
a3a0064b2f
commit
f76a8cbd7a
|
@ -207,6 +207,11 @@
|
|||
},
|
||||
};
|
||||
importJson.value.treePath = [];
|
||||
const currentSelectedNodes: MinderJsonNode[] = window.minder.getSelectedNodes();
|
||||
if (currentSelectedNodes && currentSelectedNodes.length > 0) {
|
||||
// 重置选中状态
|
||||
window.minder.toggleSelect(currentSelectedNodes);
|
||||
}
|
||||
window.minder.importJson(importJson.value);
|
||||
if (props.moduleId !== 'all') {
|
||||
// 携带具体的模块 ID 加载时,进入该模块内
|
||||
|
|
|
@ -177,6 +177,11 @@
|
|||
*/
|
||||
async function switchNode(node?: MinderJsonNode | MinderJsonNodeData, index?: number) {
|
||||
if (!props.minderKey || index === currentTreePath.value.length - 1) return;
|
||||
const currentSelectedNodes: MinderJsonNode[] = window.minder.getSelectedNodes();
|
||||
if (currentSelectedNodes && currentSelectedNodes.length > 0) {
|
||||
// 切换前,如果有选中节点,先取消选中
|
||||
window.minder.toggleSelect(currentSelectedNodes);
|
||||
}
|
||||
if (minderStore.minderUnsaved) {
|
||||
// 切换前,如果脑图未保存,先把更改的节点信息同步一次
|
||||
replaceNodeInTree(
|
||||
|
|
Loading…
Reference in New Issue