diff --git a/README.md b/README.md index 6d55ff8..ec3b72b 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ npm run dist # 编译exe可执行文件 + 右键菜单 + 面板拖拽新建节点 + 变量自动补全 ++ 设置面板 ## About 目前编辑器还处于非常简陋的阶段,有问题可以联系作者(QQ1013299930),本项目将长期维护,望前端大佬们多提点~ \ No newline at end of file diff --git a/common/Utils.ts b/common/Utils.ts index 55f3100..6e81bbd 100644 --- a/common/Utils.ts +++ b/common/Utils.ts @@ -55,12 +55,14 @@ export const calcTreeNodeSize = (treeNode: GraphNodeModel) => { var height = 40; const updateHeight = (obj: any) => { if (Array.isArray(obj) || (obj && Object.keys(obj).length > 0)) { - height += 30; + const { str, line } = toBreakWord(`参数:${JSON.stringify(obj)}`, 35); + console.log("line", str, line); + height += 20 * line; } }; - updateHeight(treeNode.conf.args); - updateHeight(treeNode.conf.input); - updateHeight(treeNode.conf.output); + updateHeight(treeNode.args); + updateHeight(treeNode.input); + updateHeight(treeNode.output); return [200, height]; };