fix: 🐛 增加剪切快捷键

This commit is contained in:
林熠 2020-05-07 21:52:28 +08:00
parent 3ca6830834
commit a73a82e063

View File

@ -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