Doc: update

This commit is contained in:
街角小林
2024-04-09 18:47:40 +08:00
parent 088fd398a9
commit 5bff885c00
4 changed files with 1595 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ const mindMap = new MindMap({
| Field Name | Type | Default Value | Description | Required | | Field Name | Type | Default Value | Description | Required |
| -------------------------------- | ------- | ---------------- | ------------------------------------------------------------ | -------- | | -------------------------------- | ------- | ---------------- | ------------------------------------------------------------ | -------- |
| el | Element | | Container element, must be a DOM element | Yes | | el | Element | | Container element, must be a DOM elementWhen the position of container elements on the page has changed but the size has not changed, the 'getElRectInfo()' method must be called to update the relevant information inside the library; When the size also changes, the 'resize()' method must be called, otherwise it will cause some functional exceptions | Yes |
| data | Object 、null | | Mind map data, Please refer to the introduction of 【Data structure】 below. V0.9.9+supports passing empty objects or null, and the canvas will display blank space | | | data | Object 、null | | Mind map data, Please refer to the introduction of 【Data structure】 below. V0.9.9+supports passing empty objects or null, and the canvas will display blank space | |
| layout | String | logicalStructure | Layout type, options: logicalStructure (logical structure diagram), mindMap (mind map), catalogOrganization (catalog organization diagram), organizationStructure (organization structure diagram)、timelinev0.5.4+, timeline、timeline2v0.5.4+, up down alternating timeline、fishbonev0.5.4+, fishbone diagram | | | layout | String | logicalStructure | Layout type, options: logicalStructure (logical structure diagram), mindMap (mind map), catalogOrganization (catalog organization diagram), organizationStructure (organization structure diagram)、timelinev0.5.4+, timeline、timeline2v0.5.4+, up down alternating timeline、fishbonev0.5.4+, fishbone diagram | |
| fishboneDegv0.5.4+ | Number | 45 | Set the diagonal angle of the fishbone structure diagram | | | fishboneDegv0.5.4+ | Number | 45 | Set the diagonal angle of the fishbone structure diagram | |
@@ -355,6 +355,10 @@ Current Theme Configuration.
## Instance methods ## Instance methods
### getElRectInfo()
Update the position and size information of container elements. Be sure to call this method to update information when the position of container elements on the page changes. If the size of container elements has also changed, please call the 'resize' method.
### updateData(data) ### updateData(data)
> v0.9.9+ > v0.9.9+

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@ const mindMap = new MindMap({
| 字段名称 | 类型 | 默认值 | 描述 | | 字段名称 | 类型 | 默认值 | 描述 |
| -------------------------------- | ------- | ---------------- | ------------------------------------------------------------ | | -------------------------------- | ------- | ---------------- | ------------------------------------------------------------ |
| el | Element | | 容器元素必传必须为DOM元素 | | el | Element | | 容器元素必传必须为DOM元素(当容器元素在页面上的位置发生了改变,但大小没有改变的情况下必须调用`getElRectInfo()`方法更新库内部的相关信息;当大小也发生了改变后必须调用`resize()`方法,否则会造成一些功能异常) |
| data | Object 、 null | | 思维导图数据可参考下方【数据结构】介绍。v0.9.9+支持传空对象或者null画布会显示空白 | | data | Object 、 null | | 思维导图数据可参考下方【数据结构】介绍。v0.9.9+支持传空对象或者null画布会显示空白 |
| layout | String | logicalStructure | 布局类型可选列表logicalStructure逻辑结构图、mindMap思维导图、catalogOrganization目录组织图、organizationStructure组织结构图、timelinev0.5.4+时间轴、timeline2v0.5.4+上下交替型时间轴、fishbonev0.5.4+,鱼骨图) | | layout | String | logicalStructure | 布局类型可选列表logicalStructure逻辑结构图、mindMap思维导图、catalogOrganization目录组织图、organizationStructure组织结构图、timelinev0.5.4+时间轴、timeline2v0.5.4+上下交替型时间轴、fishbonev0.5.4+,鱼骨图) |
| fishboneDegv0.5.4+ | Number | 45 | 设置鱼骨结构图的斜线角度 | | fishboneDegv0.5.4+ | Number | 45 | 设置鱼骨结构图的斜线角度 |
@@ -357,6 +357,10 @@ mindMap.setTheme('主题名称')
## 实例方法 ## 实例方法
### getElRectInfo()
更新容器元素的位置和大小信息。当容器元素在页面中的位置发生了改变之后务必调用该方法更新信息。如果容器元素大小也发生了改变,那么请调用`resize`方法。
### updateData(data) ### updateData(data)
> v0.9.9+ > v0.9.9+

View File

@@ -31,7 +31,7 @@
<td>el</td> <td>el</td>
<td>Element</td> <td>Element</td>
<td></td> <td></td>
<td>容器元素必传必须为DOM元素</td> <td>容器元素必传必须为DOM元素当容器元素在页面上的位置发生了改变但大小没有改变的情况下必须调用<code>getElRectInfo()</code>方法更新库内部的相关信息当大小也发生了改变后必须调用<code>resize()</code>方法否则会造成一些功能异常</td>
</tr> </tr>
<tr> <tr>
<td>data</td> <td>data</td>
@@ -831,6 +831,8 @@ mindMap.setTheme(<span class="hljs-string">&#x27;主题名称&#x27;</span>)
<h3>themeConfig</h3> <h3>themeConfig</h3>
<p>当前主题配置</p> <p>当前主题配置</p>
<h2>实例方法</h2> <h2>实例方法</h2>
<h3>getElRectInfo()</h3>
<p>更新容器元素的位置和大小信息当容器元素在页面中的位置发生了改变之后务必调用该方法更新信息如果容器元素大小也发生了改变那么请调用<code>resize</code>方法</p>
<h3>updateData(data)</h3> <h3>updateData(data)</h3>
<blockquote> <blockquote>
<p>v0.9.9+</p> <p>v0.9.9+</p>