mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Doc: update
This commit is contained in:
parent
b950c2bfe9
commit
f2fbde3763
@ -18,6 +18,7 @@ let APIList = [
|
||||
'constructor',
|
||||
'node',
|
||||
'render',
|
||||
'textEdit',
|
||||
'view',
|
||||
'keyCommand',
|
||||
'command',
|
||||
|
||||
@ -11,7 +11,13 @@ Gets the current list of active nodes.
|
||||
|
||||
### root
|
||||
|
||||
Gets the root node of the node tree.
|
||||
Node tree, also known as the mind map node instance tree.
|
||||
|
||||
### renderTree
|
||||
|
||||
The rendering tree, also known as the data tree of the mind map.
|
||||
|
||||
### layout
|
||||
|
||||
## Methods
|
||||
|
||||
@ -114,10 +120,6 @@ Search for the index of a node in the active list.
|
||||
|
||||
Get the position index of a node among its siblings.
|
||||
|
||||
### removeOneNode(node)
|
||||
|
||||
Delete a specific node.
|
||||
|
||||
### copyNode()
|
||||
|
||||
Copy a node, the active node is the node to be operated on, if there are
|
||||
@ -191,4 +193,16 @@ Cut a node. After calling this method, the currently active node will be cut and
|
||||
|
||||
> v0.6.8+
|
||||
|
||||
Pasting nodes can be done by calling the 'copy()' or 'cut()' method after calling it. This method does not support pasting data from the user's clipboard. Please use the built-in 'Ctrl+v' shortcut key.
|
||||
Pasting nodes can be done by calling the 'copy()' or 'cut()' method after calling it. This method does not support pasting data from the user's clipboard. Please use the built-in 'Ctrl+v' shortcut key.
|
||||
|
||||
### clearCache()
|
||||
|
||||
Empty the node cache pool.
|
||||
|
||||
### emitNodeActiveEvent(node = null, activeNodeList = [...this.activeNodeList])
|
||||
|
||||
- `node`:The node activated this time
|
||||
|
||||
- `activeNodeList`:All currently activated nodes
|
||||
|
||||
Dispatch node activation event, which triggers `node_active` event.
|
||||
@ -7,7 +7,10 @@ accessed through <code>mindMap.renderer</code>.</p>
|
||||
<h3>activeNodeList</h3>
|
||||
<p>Gets the current list of active nodes.</p>
|
||||
<h3>root</h3>
|
||||
<p>Gets the root node of the node tree.</p>
|
||||
<p>Node tree, also known as the mind map node instance tree.</p>
|
||||
<h3>renderTree</h3>
|
||||
<p>The rendering tree, also known as the data tree of the mind map.</p>
|
||||
<h3>layout</h3>
|
||||
<h2>Methods</h2>
|
||||
<h3>highlightNode(node, range)</h3>
|
||||
<blockquote>
|
||||
@ -93,8 +96,6 @@ disable the enter key and delete key related shortcuts to prevent conflicts.</p>
|
||||
<p>Search for the index of a node in the active list.</p>
|
||||
<h3>getNodeIndex(node)</h3>
|
||||
<p>Get the position index of a node among its siblings.</p>
|
||||
<h3>removeOneNode(node)</h3>
|
||||
<p>Delete a specific node.</p>
|
||||
<h3>copyNode()</h3>
|
||||
<p>Copy a node, the active node is the node to be operated on, if there are
|
||||
multiple active nodes, only the first node will be operated on.</p>
|
||||
@ -162,6 +163,18 @@ is an object, e.g. <code>{text: 'I am new text'}</code>.</p>
|
||||
<p>v0.6.8+</p>
|
||||
</blockquote>
|
||||
<p>Pasting nodes can be done by calling the 'copy()' or 'cut()' method after calling it. This method does not support pasting data from the user's clipboard. Please use the built-in 'Ctrl+v' shortcut key.</p>
|
||||
<h3>clearCache()</h3>
|
||||
<p>Empty the node cache pool.</p>
|
||||
<h3>emitNodeActiveEvent(node = null, activeNodeList = [...this.activeNodeList])</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>node</code>:The node activated this time</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>activeNodeList</code>:All currently activated nodes</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Dispatch node activation event, which triggers <code>node_active</code> event.</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
23
web/src/pages/Doc/en/textEdit/index.md
Normal file
23
web/src/pages/Doc/en/textEdit/index.md
Normal file
@ -0,0 +1,23 @@
|
||||
# TextEdit instance
|
||||
|
||||
Node text editing instance. It can be obtained through `mindMap.renderer.textEdit`.
|
||||
|
||||
## Methods
|
||||
|
||||
### isShowTextEdit()
|
||||
|
||||
Get whether the current text editing box is in a display state, that is, whether it is in a text editing state.
|
||||
|
||||
### hideEditTextBox()
|
||||
|
||||
Hiding the text editing box will set the content of the current text editing box as node text.
|
||||
|
||||
### registerTmpShortcut()
|
||||
|
||||
Register temporary shortcut keys, which means editing can be completed through the Enter and Tab keys.
|
||||
|
||||
### show({ node})
|
||||
|
||||
- `node`:Node instance to enter for editing
|
||||
|
||||
Manually enable node editing. By default, it will enter node editing when double clicking or pressing F2 on the node.
|
||||
29
web/src/pages/Doc/en/textEdit/index.vue
Normal file
29
web/src/pages/Doc/en/textEdit/index.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>TextEdit instance</h1>
|
||||
<p>Node text editing instance. It can be obtained through <code>mindMap.renderer.textEdit</code>.</p>
|
||||
<h2>Methods</h2>
|
||||
<h3>isShowTextEdit()</h3>
|
||||
<p>Get whether the current text editing box is in a display state, that is, whether it is in a text editing state.</p>
|
||||
<h3>hideEditTextBox()</h3>
|
||||
<p>Hiding the text editing box will set the content of the current text editing box as node text.</p>
|
||||
<h3>registerTmpShortcut()</h3>
|
||||
<p>Register temporary shortcut keys, which means editing can be completed through the Enter and Tab keys.</p>
|
||||
<h3>show({ node})</h3>
|
||||
<ul>
|
||||
<li><code>node</code>:Node instance to enter for editing</li>
|
||||
</ul>
|
||||
<p>Manually enable node editing. By default, it will enter node editing when double clicking or pressing F2 on the node.</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@ -41,6 +41,7 @@ export default [
|
||||
{ path: 'miniMap', title: 'MiniMap插件' },
|
||||
{ path: 'node', title: 'Node实例' },
|
||||
{ path: 'render', title: 'Render实例' },
|
||||
{ path: 'textEdit', title: 'TextEdit实例' },
|
||||
{ path: 'richText', title: 'RichText插件' },
|
||||
{ path: 'select', title: 'Select 插件 ' },
|
||||
{ path: 'start', title: '开始' },
|
||||
@ -83,6 +84,7 @@ export default [
|
||||
{ path: 'miniMap', title: 'MiniMap plugin' },
|
||||
{ path: 'node', title: 'Node instance' },
|
||||
{ path: 'render', title: 'Render instance' },
|
||||
{ path: 'textEdit', title: 'TextEdit instance' },
|
||||
{ path: 'richText', title: 'RichText plugin' },
|
||||
{ path: 'select', title: 'Select plugin' },
|
||||
{ path: 'start', title: 'Start' },
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Render实例
|
||||
# Render 实例
|
||||
|
||||
`render`实例负载整个渲染过程,可通过`mindMap.renderer`获取到。
|
||||
|
||||
@ -10,7 +10,15 @@
|
||||
|
||||
### root
|
||||
|
||||
获取节点树的根节点。
|
||||
节点树,也就是思维导图节点实例树。
|
||||
|
||||
### renderTree
|
||||
|
||||
渲染树,也就是思维导图的数据树。
|
||||
|
||||
### layout
|
||||
|
||||
当前的布局实例。
|
||||
|
||||
## 方法
|
||||
|
||||
@ -112,10 +120,6 @@
|
||||
|
||||
获取节点在同级里的位置索引。
|
||||
|
||||
### removeOneNode(node)
|
||||
|
||||
删除某个指定节点。
|
||||
|
||||
### copyNode()
|
||||
|
||||
复制节点,操作节点为当前激活节点,有多个激活节点只会操作第一个节点。
|
||||
@ -156,19 +160,19 @@
|
||||
|
||||
> v0.6.7+
|
||||
|
||||
- `uid`:节点uid
|
||||
- `uid`:节点 uid
|
||||
|
||||
- `callback`:展开完成的回调函数
|
||||
|
||||
展开到指定uid的节点。
|
||||
展开到指定 uid 的节点。
|
||||
|
||||
### findNodeByUid(uid)
|
||||
|
||||
> v0.6.7+
|
||||
|
||||
- `uid`:节点uid
|
||||
- `uid`:节点 uid
|
||||
|
||||
根据uid找到对应的节点实例。
|
||||
根据 uid 找到对应的节点实例。
|
||||
|
||||
### copy()
|
||||
|
||||
@ -186,4 +190,16 @@
|
||||
|
||||
> v0.6.8+
|
||||
|
||||
粘贴节点,在调用了`copy()`或`cut()`方法后可以调用该方法进行粘贴节点。该方法不支持粘贴用户剪贴板中的数据,请使用内置的`Ctrl+v`快捷键。
|
||||
粘贴节点,在调用了`copy()`或`cut()`方法后可以调用该方法进行粘贴节点。该方法不支持粘贴用户剪贴板中的数据,请使用内置的`Ctrl+v`快捷键。
|
||||
|
||||
### clearCache()
|
||||
|
||||
清空节点缓存池。
|
||||
|
||||
### emitNodeActiveEvent(node = null, activeNodeList = [...this.activeNodeList])
|
||||
|
||||
- `node`:本次激活的节点
|
||||
|
||||
- `activeNodeList`:当前所有激活的节点
|
||||
|
||||
派发节点激活事件,也就是触发`node_active`事件。
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Render实例</h1>
|
||||
<h1>Render 实例</h1>
|
||||
<p><code>render</code>实例负载整个渲染过程,可通过<code>mindMap.renderer</code>获取到。</p>
|
||||
<h2>属性</h2>
|
||||
<h3>activeNodeList</h3>
|
||||
<p>获取当前激活的节点列表。</p>
|
||||
<h3>root</h3>
|
||||
<p>获取节点树的根节点。</p>
|
||||
<p>节点树,也就是思维导图节点实例树。</p>
|
||||
<h3>renderTree</h3>
|
||||
<p>渲染树,也就是思维导图的数据树。</p>
|
||||
<h3>layout</h3>
|
||||
<p>当前的布局实例。</p>
|
||||
<h2>方法</h2>
|
||||
<h3>highlightNode(node, range)</h3>
|
||||
<blockquote>
|
||||
@ -91,8 +95,6 @@
|
||||
<p>检索某个节点在激活列表里的索引。</p>
|
||||
<h3>getNodeIndex(node)</h3>
|
||||
<p>获取节点在同级里的位置索引。</p>
|
||||
<h3>removeOneNode(node)</h3>
|
||||
<p>删除某个指定节点。</p>
|
||||
<h3>copyNode()</h3>
|
||||
<p>复制节点,操作节点为当前激活节点,有多个激活节点只会操作第一个节点。</p>
|
||||
<h3>setNodeDataRender(node, data, notRender)</h3>
|
||||
@ -127,21 +129,21 @@
|
||||
</blockquote>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>uid</code>:节点uid</p>
|
||||
<p><code>uid</code>:节点 uid</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>callback</code>:展开完成的回调函数</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>展开到指定uid的节点。</p>
|
||||
<p>展开到指定 uid 的节点。</p>
|
||||
<h3>findNodeByUid(uid)</h3>
|
||||
<blockquote>
|
||||
<p>v0.6.7+</p>
|
||||
</blockquote>
|
||||
<ul>
|
||||
<li><code>uid</code>:节点uid</li>
|
||||
<li><code>uid</code>:节点 uid</li>
|
||||
</ul>
|
||||
<p>根据uid找到对应的节点实例。</p>
|
||||
<p>根据 uid 找到对应的节点实例。</p>
|
||||
<h3>copy()</h3>
|
||||
<blockquote>
|
||||
<p>v0.6.8+</p>
|
||||
@ -157,6 +159,18 @@
|
||||
<p>v0.6.8+</p>
|
||||
</blockquote>
|
||||
<p>粘贴节点,在调用了<code>copy()</code>或<code>cut()</code>方法后可以调用该方法进行粘贴节点。该方法不支持粘贴用户剪贴板中的数据,请使用内置的<code>Ctrl+v</code>快捷键。</p>
|
||||
<h3>clearCache()</h3>
|
||||
<p>清空节点缓存池。</p>
|
||||
<h3>emitNodeActiveEvent(node = null, activeNodeList = [...this.activeNodeList])</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p><code>node</code>:本次激活的节点</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>activeNodeList</code>:当前所有激活的节点</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>派发节点激活事件,也就是触发<code>node_active</code>事件。</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
23
web/src/pages/Doc/zh/textEdit/index.md
Normal file
23
web/src/pages/Doc/zh/textEdit/index.md
Normal file
@ -0,0 +1,23 @@
|
||||
# TextEdit 实例
|
||||
|
||||
节点文本编辑实例。可以通过`mindMap.renderer.textEdit`获取到。
|
||||
|
||||
## 方法
|
||||
|
||||
### isShowTextEdit()
|
||||
|
||||
获取当前文本编辑框是否处于显示状态,也就是是否处在文本编辑状态。
|
||||
|
||||
### hideEditTextBox()
|
||||
|
||||
隐藏文本编辑框,会将当前文本编辑框中的内容设置为节点文本。
|
||||
|
||||
### registerTmpShortcut()
|
||||
|
||||
注册临时快捷键,也就是可以通过 Enter 键和 Tab 键完成编辑。
|
||||
|
||||
### show({ node})
|
||||
|
||||
- `node`:要进入编辑的节点实例
|
||||
|
||||
手动开启节点编辑。默认会在节点双击、按 F2 时进入节点编辑。
|
||||
29
web/src/pages/Doc/zh/textEdit/index.vue
Normal file
29
web/src/pages/Doc/zh/textEdit/index.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>TextEdit 实例</h1>
|
||||
<p>节点文本编辑实例。可以通过<code>mindMap.renderer.textEdit</code>获取到。</p>
|
||||
<h2>方法</h2>
|
||||
<h3>isShowTextEdit()</h3>
|
||||
<p>获取当前文本编辑框是否处于显示状态,也就是是否处在文本编辑状态。</p>
|
||||
<h3>hideEditTextBox()</h3>
|
||||
<p>隐藏文本编辑框,会将当前文本编辑框中的内容设置为节点文本。</p>
|
||||
<h3>registerTmpShortcut()</h3>
|
||||
<p>注册临时快捷键,也就是可以通过 Enter 键和 Tab 键完成编辑。</p>
|
||||
<h3>show({ node})</h3>
|
||||
<ul>
|
||||
<li><code>node</code>:要进入编辑的节点实例</li>
|
||||
</ul>
|
||||
<p>手动开启节点编辑。默认会在节点双击、按 F2 时进入节点编辑。</p>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user