feat(core): micropython 板卡文件管理 允许将数据剪切到根目录
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user