diff --git a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue index cb141b9624..20bbebc226 100644 --- a/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue +++ b/frontend/src/components/business/ms-minders/featureCaseMinder/index.vue @@ -449,7 +449,11 @@ waitingRenderNodes.push(moreNode); } window.minder.renderNodeBatch(waitingRenderNodes); - node.layout(); + if (node.parent) { + node.parent?.layout(); + } else { + node.layout(); + } data.isLoaded = true; // 加载完用例数据后,更新当前importJson数据 replaceNodeInTree([importJson.value.root], node.data?.id || '', window.minder.exportNode(node), 'data', 'id'); diff --git a/frontend/src/components/pure/ms-minder-editor/hooks/useMinderOperation.ts b/frontend/src/components/pure/ms-minder-editor/hooks/useMinderOperation.ts index ba7343a8ba..0f5a7c9d91 100644 --- a/frontend/src/components/pure/ms-minder-editor/hooks/useMinderOperation.ts +++ b/frontend/src/components/pure/ms-minder-editor/hooks/useMinderOperation.ts @@ -44,6 +44,7 @@ export default function useMinderOperation({ */ const minderCopy = (e?: ClipboardEvent) => { if (!canShowMoreMenuNodeOperation) { + e?.preventDefault(); return; } const { editor } = window; @@ -69,6 +70,7 @@ export default function useMinderOperation({ */ const minderCut = (e?: ClipboardEvent) => { if (!canShowMoreMenuNodeOperation) { + e?.preventDefault(); return; } const { editor } = window; @@ -103,7 +105,8 @@ export default function useMinderOperation({ * 执行粘贴 */ const minderPaste = (e?: ClipboardEvent) => { - if (!canShowMoreMenuNodeOperation || !canShowPasteMenu) { + if (!canShowMoreMenuNodeOperation && !canShowPasteMenu) { + e?.preventDefault(); return; } const { editor } = window; diff --git a/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts b/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts index 9153a4fa8d..05bc1532f0 100644 --- a/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts +++ b/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts @@ -15,8 +15,8 @@ export default function useShortCut(shortcuts: Shortcuts, options: MinderOperati // 定义组合键事件 const combinationShortcuts: { [key: string]: ShortcutKey } = { - z: 'undo', // 撤销 - y: 'redo', // 重做 + // z: 'undo', // 撤销 TODO:暂时不上撤销和重做 + // y: 'redo', // 重做 enter: 'enter', // 进入节点 }; // 定义单键事件 diff --git a/frontend/src/components/pure/ms-minder-editor/main/navigator.vue b/frontend/src/components/pure/ms-minder-editor/main/navigator.vue index 2ac1c29f43..066e699cd8 100644 --- a/frontend/src/components/pure/ms-minder-editor/main/navigator.vue +++ b/frontend/src/components/pure/ms-minder-editor/main/navigator.vue @@ -110,7 +110,7 @@ -