Comments (9)
参数不对,文档看不懂,可以看看教程:https://wanglin2.github.io/mind-map/#/doc/zh/course3
from mind-map.
参数不对,文档看不懂,可以看看教程:https://wanglin2.github.io/mind-map/#/doc/zh/course3
from mind-map.
改成了这样还是不行
mindMap.current.execCommand(
'INSERT_NODE',
false,
[],
list.map((v) => {
return {
data: {
uid: createUid(),
text: v.name,
},
};
}),
);
from mind-map.
第三个参数它也不是数组啊
from mind-map.
插入多个同级节点
插入多个同级节点可以执行INSERT_MULTI_NODE命令:
mindMap.execCommand('INSERT_NODE'. [], nodeList)
nodeList是要插入的同级节点数据的数组,必传。
from mind-map.
源码:
// 插入同级节点
insertNode(
openEdit = true,
appointNodes = [],
appointData = null,
appointChildren = []
)
那我应该传
mindMap.current.execCommand(
'INSERT_NODE',
false,
list.map((v) => {
return {
data: {
uid: createUid(),
text: v.name,
},
};
}),
);
这样也不对
from mind-map.
哦我知道了。文档写错了。
插入多个同级节点
插入多个同级节点可以执行INSERT_MULTI_NODE命令:
mindMap.execCommand('INSERT_NODE'. [], nodeList)
nodeList是要插入的同级节点数据的数组,必传。
代码那里的命令错了
from mind-map.
哦我知道了。文档写错了。
插入多个同级节点 插入多个同级节点可以执行INSERT_MULTI_NODE命令:
mindMap.execCommand('INSERT_NODE'. [], nodeList) nodeList是要插入的同级节点数据的数组,必传。
代码那里的命令错了
@wanglin2 有空更新一下
from mind-map.
INSERT_MULTI_NODE
应该都是【INSERT_MULTI_NODE】你在下面的代码写的是【INSERT_NODE】
from mind-map.
Related Issues (20)
- 关联线支持配置线条类型 HOT 1
- 网页版:在低版本下的chrome中(100版本以下),节点编辑状态下不能选中文字(只能双击全选,但不能用鼠标选择文字) HOT 1
- 如何限制最大层数? HOT 6
- 网页demo的Bug提交:有关回退功能;有关主题切换;有关右下角输入缩放率的问题;有关搜索与替换功能 HOT 1
- tree导出文件目录树转化为导图 HOT 1
- 搜索插件无法搜索到概要节点 HOT 1
- 富文本模式下切换主题,概要节点的文本样式没有跟随改变 HOT 1
- 同时选中概要节点和其所属节点,设置节点样式后概要节点会失去激活状态 HOT 2
- 需求建议:希望初始化配置的时候可以给每个节点增加自定义属性,并能在 Node 节点实例中可以获取到 HOT 1
- 鼠标框选、全选操作无法选中概要节点 HOT 1
- 希望增加 备注图标的点击事件 HOT 1
- 使用打包后的 umd 版本库,生成的 mindMap 左右上下拖动时,会有一个明显的边界感,不像直接引用非打包文件时的无边界感。 HOT 2
- 剪切板直接粘贴的图片,无法保存. HOT 1
- 无法新建
- 文档切换为VitePress构建,从demo中剥离 HOT 1
- 评价收集,进来说出你对simple-mind-map的评价吧 HOT 2
- 浏览器默认行为:“拖动鼠标选中文本”失效 HOT 1
- 希望增加 自定义图标的功能 HOT 2
- 文档错误修改
- 您好,在深度使用smm的网页demo过后,我发现以下问题,以及我的小建议
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mind-map.