1.0.8 • Published 3 months ago

@codernote/tree-editor v1.0.8

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

记录软件 - 树编辑器

记录软件使用的编辑器,内部使用

安装

npm install @codernote/tree-editor

示例

import TreeEditor from "@codernote/tree-editor";

// root为装载编辑器节点的id
const treeEditor = new TreeEditor("root");

// 加载数据
treeEditor.loadTree(data);

事件

注册监听事

treeEditor.on("fileUpload", (files, callback) => {
  // files为上传的文件,可操作文件上传等异步操作
  // callback为回调
});

treeEditor.on("dataChanged", (data) => {
  // 监听数据变动
});

卸载监听

// cb为注册事件时的监听函数
treeEditor.off("fileUpload", cb);
treeEditor.off("dataChanged", cb);

发布

npm publish
1.0.8

3 months ago

1.0.7

3 months ago

1.0.6

3 months ago

1.0.5

3 months ago

1.0.4

3 months ago

1.0.2

3 months ago

1.0.3

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago

0.0.2

3 months ago

0.0.1

3 months ago