DTStack / molecule

:rocket: A lightweight Web IDE UI framework.

Home Page:https://dtstack.github.io/molecule/

Repository from Github https://github.comDTStack/moleculeRepository from Github https://github.comDTStack/molecule

请问如何更改默认的功能?

caoyang2002 opened this issue · comments

commented

Question

我想要创建文件,内置提供的按钮无法使用,我需要更改创建文件按钮的逻辑,我看了文档后仍然没有理解如何解决这个问题

image
commented

点击新建文件按钮会触发 folderTree 的 onCreate 事件,可以通过 extension 来自定义创建逻辑,可以参考我们demo里的实现:

molecule.folderTree.onCreate((type, nodeId) => {

const addRootFolder = () => {