diff --git a/packages/designer/src/designer/builtin-hotkey.ts b/packages/designer/src/designer/builtin-hotkey.ts index d11edbe03..7831f95e3 100644 --- a/packages/designer/src/designer/builtin-hotkey.ts +++ b/packages/designer/src/designer/builtin-hotkey.ts @@ -58,14 +58,15 @@ hotkey.bind(['command+c', 'ctrl+c', 'command+x', 'ctrl+x'], (e, action) => { const data = { type: 'nodeSchema', componentsMap, componentsTree }; clipboard.setData(data); - /* + const cutMode = action.indexOf('x') > 0; if (cutMode) { - const parentNode = selected.getParent(); - parentNode.select(); - selected.remove(); + selected.forEach((node) => { + const parentNode = node.getParent(); + parentNode?.select(); + node.remove(); + }); } - */ }); // command + v paste