diff --git a/README.md b/README.md index 6c564ba1..4325b456 100644 --- a/README.md +++ b/README.md @@ -170,13 +170,11 @@ import MindMap from "simple-mind-map"; const mindMap = new MindMap({ el: document.getElementById("mindMapContainer"), data: { - "root": { - "data": { - "text": "root node", - }, - "children": [], + "data": { + "text": "根节点" }, - }, + "children": [] + } }); ``` diff --git a/README.zh-Hans.md b/README.zh-Hans.md index f4fa4e38..e5eb9909 100644 --- a/README.zh-Hans.md +++ b/README.zh-Hans.md @@ -145,12 +145,10 @@ import MindMap from "simple-mind-map"; const mindMap = new MindMap({ el: document.getElementById('mindMapContainer'), data: { - "root": { - "data": { - "text": "根节点" - }, - "children": [] - } + "data": { + "text": "根节点" + }, + "children": [] } }); ```