feat(core): micropython 板卡文件管理 允许将数据剪切到根目录

This commit is contained in:
王立帮
2025-09-01 00:52:15 +08:00
parent 2ddfbfc6e8
commit a2b466893e

View File

@@ -345,8 +345,14 @@ class FileTree extends Component {
isHtmlName: true,
name: Menu.getItem(Msg.Lang['editor.contextMenu.paste'], ''),
callback: (_, { $trigger }) => {
let id = $trigger.attr('id');
this.pasteNode(id);
const type = $trigger.attr('type');
if (type === 'root') {
this.openRootFolder();
this.pasteNode('/');
} else {
const id = $trigger.attr('id');
this.pasteNode(id);
}
}
}
});