From cd3baf411bc86b21af27f9b4d7ab3409996baf59 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Sun, 2 Apr 2023 21:08:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 ++- web/src/pages/Doc/en/changelog/index.md | 16 +++++++ web/src/pages/Doc/en/changelog/index.vue | 12 ++++++ web/src/pages/Doc/en/constructor/index.md | 2 + web/src/pages/Doc/en/constructor/index.vue | 14 ++++++ web/src/pages/Doc/en/introduction/index.md | 16 ++++--- web/src/pages/Doc/en/introduction/index.vue | 48 ++++++++++----------- web/src/pages/Doc/en/node/index.md | 24 ++++------- web/src/pages/Doc/en/node/index.vue | 19 ++++---- web/src/pages/Doc/en/start/index.md | 2 + web/src/pages/Doc/en/start/index.vue | 3 ++ web/src/pages/Doc/zh/changelog/index.md | 16 +++++++ web/src/pages/Doc/zh/changelog/index.vue | 12 ++++++ web/src/pages/Doc/zh/constructor/index.md | 2 + web/src/pages/Doc/zh/constructor/index.vue | 14 ++++++ web/src/pages/Doc/zh/introduction/index.md | 16 ++++--- web/src/pages/Doc/zh/introduction/index.vue | 48 +++++++++++---------- web/src/pages/Doc/zh/node/index.md | 20 ++++----- web/src/pages/Doc/zh/node/index.vue | 15 ++++--- web/src/pages/Doc/zh/start/index.md | 2 + web/src/pages/Doc/zh/start/index.vue | 3 ++ 21 files changed, 203 insertions(+), 106 deletions(-) diff --git a/README.md b/README.md index 999f18cd..f424d638 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Demo:[https://wanglin2.github.io/mind-map/](https://wanglin2.github.io/mind-ma # 特性 +- [x] 插件化架构,除核心功能外,其他功能作为插件提供,按需使用,减小整体体积 - [x] 支持逻辑结构图、思维导图、组织结构图、目录组织图四种结构 - [x] 内置多种主题,允许高度自定义样式,支持注册新主题 - [x] 支持快捷键 @@ -24,8 +25,8 @@ Demo:[https://wanglin2.github.io/mind-map/](https://wanglin2.github.io/mind-ma - [x] 支持右键和Ctrl+左键两种多选方式 - [x] 支持节点自由拖拽、拖拽调整 - [x] 支持多种节点形状 -- [x] 支持导出为`json`、`png`、`svg`、`pdf`,支持从`json`、`xmind`导入 -- [x] 支持小地图 +- [x] 支持导出为`json`、`png`、`svg`、`pdf`、`markdown`,支持从`json`、`xmind`、`markdown`导入 +- [x] 支持小地图、支持水印 - [x] 支持关联线 # 安装 diff --git a/web/src/pages/Doc/en/changelog/index.md b/web/src/pages/Doc/en/changelog/index.md index dbd7989e..e2bb042d 100644 --- a/web/src/pages/Doc/en/changelog/index.md +++ b/web/src/pages/Doc/en/changelog/index.md @@ -2,6 +2,22 @@ ## 0.5.0 +This version is mainly about code level changes and optimization, with the core goal of improving rendering performance and reducing stuck issues. + +New: 1.Support custom expansion and collapse node icons and colors; + +optimization: 1.Optimize rendering logic, set the theme, move forward and backward, and other operations no longer require full rendering; + + 2.Optimize node drag logic, and fix the problem of being unable to drag between two nodes; + + 3.Collapse all nodes adds logic to return to the center point; + + 4.Fix the problem of nodes flying and scrambling caused by triggering rendering multiple times in a short time; + + 5.Optimize the experience of node editing; + +Fix: 1.Fix the issue where the setData method does not trigger history; + modify: Starting from version 0.5.0, considering performance issues, the node activation state can only modify shape related styles: ```js diff --git a/web/src/pages/Doc/en/changelog/index.vue b/web/src/pages/Doc/en/changelog/index.vue index 314bf9c8..170d400d 100644 --- a/web/src/pages/Doc/en/changelog/index.vue +++ b/web/src/pages/Doc/en/changelog/index.vue @@ -2,6 +2,18 @@
This version is mainly about code level changes and optimization, with the core goal of improving rendering performance and reducing stuck issues.
+New: 1.Support custom expansion and collapse node icons and colors;
+optimization: 1.Optimize rendering logic, set the theme, move forward and backward, and other operations no longer require full rendering;
+ 2.Optimize node drag logic, and fix the problem of being unable to drag between two nodes;
+
+ 3.Collapse all nodes adds logic to return to the center point;
+
+ 4.Fix the problem of nodes flying and scrambling caused by triggering rendering multiple times in a short time;
+
+ 5.Optimize the experience of node editing;
+
+Fix: 1.Fix the issue where the setData method does not trigger history;
modify: Starting from version 0.5.0, considering performance issues, the node activation state can only modify shape related styles:
[
'fillColor',
diff --git a/web/src/pages/Doc/en/constructor/index.md b/web/src/pages/Doc/en/constructor/index.md
index be165c24..5ad7fcfd 100644
--- a/web/src/pages/Doc/en/constructor/index.md
+++ b/web/src/pages/Doc/en/constructor/index.md
@@ -46,6 +46,8 @@ const mindMap = new MindMap({
| mousewheelMoveStep(v0.4.3+) | Number | 100 | When the `mousewheelAction` is set to `move`, you can use this attribute to control the step length of the view movement when the mouse scrolls. The unit is `px` | |
| defaultInsertSecondLevelNodeText(v0.4.7+) | String | 二级节点 | Text of the default inserted secondary node | |
| defaultInsertBelowSecondLevelNodeText(v0.4.7+) | String | 分支主题 | Text for nodes below the second level inserted by default | |
+| expandBtnStyle(v0.5.0+) | Object | { color: '#808080', fill: '#fff' } | Expand the color of the stow button | |
+| expandBtnIcon(v0.5.0+) | Object | { open: '', close: '' } | Customize the icon of the expand/collapse button, and you can transfer the svg string of the icon | |
### Watermark config
diff --git a/web/src/pages/Doc/en/constructor/index.vue b/web/src/pages/Doc/en/constructor/index.vue
index 910434a6..4375b267 100644
--- a/web/src/pages/Doc/en/constructor/index.vue
+++ b/web/src/pages/Doc/en/constructor/index.vue
@@ -182,6 +182,20 @@
Text for nodes below the second level inserted by default
+
+expandBtnStyle(v0.5.0+)
+Object
+{ color: '#808080', fill: '#fff' }
+Expand the color of the stow button
+
+
+
+expandBtnIcon(v0.5.0+)
+Object
+{ open: '', close: '' }
+Customize the icon of the expand/collapse button, and you can transfer the svg string of the icon
+
+
Watermark config
diff --git a/web/src/pages/Doc/en/introduction/index.md b/web/src/pages/Doc/en/introduction/index.md
index dd0f15ab..ac415031 100644
--- a/web/src/pages/Doc/en/introduction/index.md
+++ b/web/src/pages/Doc/en/introduction/index.md
@@ -1,6 +1,6 @@
# Introduction
-`simple-mind-map` is a simple and powerful web mind map library, not dependent on any specific framework.
+`simple-mind-map` is a simple and powerful web mind map library, not dependent on any specific framework. Can help you quickly develop mind mapping products.
## Features
@@ -16,15 +16,15 @@
- [x] Supports right-click and Ctrl + left-click to select multiple items
- [x] Supports free dragging and dragging to adjust nodes
- [x] Supports various node shapes
-- [x] Supports export to json, png, svg, pdf, and import from json, xmind
+- [x] Supports export to json, png, svg, pdf markdown, and import from json, xmind, markdown
- [x] Supports mini map、support watermark
- [x] Supports associative lines
-## Table of Contents
+## Repository Catalog Introduction
1.`simple-mind-map`
-This is a mind map tool library that is framework-agnostic and can be used with
+This is a mind map library that is framework-agnostic and can be used with
frameworks such as Vue and React, or without a framework.
2.`web`
@@ -63,9 +63,11 @@ The folder containing the packaged resources for the `web` folder.
## Special Note
-This project is rough and has not been thoroughly tested, its features are not
-yet fully developed, and there are some performance issues, especially when the number of nodes is large. It is only for
-learning and reference purposes and please use it carefully for actual projects.
+This project can be used for learning and reference. Please deeply experience whether it can meet your needs when using it for actual projects.
+
+This project may not have fully tested every function point, so there may be bugs. In addition, when the number of nodes is very large, there may be some performance issues. Because everyone can accept different levels of congestion, you can test the maximum number of nodes yourself.
+
+If you have suggestions or find bugs, you can submit [issues](https://github.com/wanglin2/mind-map/issues) here.
The built-in themes and icons in the project come from:
diff --git a/web/src/pages/Doc/en/introduction/index.vue b/web/src/pages/Doc/en/introduction/index.vue
index 1ed8f75f..1c94eb68 100644
--- a/web/src/pages/Doc/en/introduction/index.vue
+++ b/web/src/pages/Doc/en/introduction/index.vue
@@ -1,43 +1,43 @@
Introduction
-simple-mind-map is a simple and powerful web mind map library, not dependent on any specific framework.
+simple-mind-map is a simple and powerful web mind map library, not dependent on any specific framework. Can help you quickly develop mind mapping products.
Features
-
--
+
+-
organizational structure diagrams, and directory organization diagrams
-
-
--
+
+
+-
summaries
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-Table of Contents
+Repository Catalog Introduction
1.simple-mind-map
-This is a mind map tool library that is framework-agnostic and can be used with
+
This is a mind map library that is framework-agnostic and can be used with
frameworks such as Vue and React, or without a framework.
2.web
This is an online mind map built using the simple-mind-map library and based
on Vue2.x and ElementUI. Features include:
--
+
-
images, icons, hyperlinks, notes, tags, and summaries
--
+
-
outline, theme selection, and structure selection
--
+
-
storage by default, but it also supports creating, opening, and editing
local files on the computer directly
--
+
-
and organizing layout
--
+
-
between edit and read-only modes, zooming in and out, and switching to
full screen, support mini map
@@ -50,9 +50,9 @@ full screen, support mini map
When you press the direction key, how does the TV find the next focus
How to simulate the background image style of css in canvas
Special Note
-This project is rough and has not been thoroughly tested, its features are not
-yet fully developed, and there are some performance issues, especially when the number of nodes is large. It is only for
-learning and reference purposes and please use it carefully for actual projects.
+This project can be used for learning and reference. Please deeply experience whether it can meet your needs when using it for actual projects.
+This project may not have fully tested every function point, so there may be bugs. In addition, when the number of nodes is very large, there may be some performance issues. Because everyone can accept different levels of congestion, you can test the maximum number of nodes yourself.
+If you have suggestions or find bugs, you can submit issues here.
The built-in themes and icons in the project come from:
diff --git a/web/src/pages/Doc/en/node/index.md b/web/src/pages/Doc/en/node/index.md
index 688b4cc6..9fb7aa24 100644
--- a/web/src/pages/Doc/en/node/index.md
+++ b/web/src/pages/Doc/en/node/index.md
@@ -56,25 +56,13 @@ Whether the node is currently being dragged
## Methods
-### addChildren(node)
-
-Add a child node
-
### getSize()
-Calculate the width and height of the node, return a boolean indicating whether
-the width and height have changed
-
-### renderNode()
-
-Render the node to the canvas, will remove the old content node and create a new
-one
+Update the width and height of the node by recreating the node content, and return a Boolean value indicating whether the width and height have changed
### render()
-Recursively render this node and all its child nodes. The first call will create
-the node content, subsequent calls will only update the node position. To
-re-render the content, set the `initRender` attribute to `true` first.
+Recursively render this node and all its child nodes
### updateNodeShape()
@@ -84,7 +72,13 @@ Update node shape nodes. For example, when the node status changes, call this me
### remove()
-Recursively delete this node and all its child nodes
+Recursive deletion, which is only deleted from the canvas. The node container is still present, and can be reinserted back into the canvas in the future
+
+### destroy()
+
+> v0.5.0+
+
+Destroying a node will not only delete it from the canvas, but also directly empty the original node, which cannot be inserted back into the canvas in the future
### renderLine()
diff --git a/web/src/pages/Doc/en/node/index.vue b/web/src/pages/Doc/en/node/index.vue
index 186fe5b3..eaf4611d 100644
--- a/web/src/pages/Doc/en/node/index.vue
+++ b/web/src/pages/Doc/en/node/index.vue
@@ -31,25 +31,22 @@
Whether the node is currently being dragged
Methods
-addChildren(node)
-Add a child node
getSize()
-Calculate the width and height of the node, return a boolean indicating whether
-the width and height have changed
-renderNode()
-Render the node to the canvas, will remove the old content node and create a new
-one
+Update the width and height of the node by recreating the node content, and return a Boolean value indicating whether the width and height have changed
render()
-Recursively render this node and all its child nodes. The first call will create
-the node content, subsequent calls will only update the node position. To
-re-render the content, set the initRender attribute to true first.
+Recursively render this node and all its child nodes
updateNodeShape()
v0.5.0+
Update node shape nodes. For example, when the node status changes, call this method to display or deactivate the style.
remove()
-Recursively delete this node and all its child nodes
+Recursive deletion, which is only deleted from the canvas. The node container is still present, and can be reinserted back into the canvas in the future
+destroy()
+
+v0.5.0+
+
+Destroying a node will not only delete it from the canvas, but also directly empty the original node, which cannot be inserted back into the canvas in the future
renderLine()
Re-render the line from this node to its child nodes
removeLine()
diff --git a/web/src/pages/Doc/en/start/index.md b/web/src/pages/Doc/en/start/index.md
index 32467e32..2d80acfb 100644
--- a/web/src/pages/Doc/en/start/index.md
+++ b/web/src/pages/Doc/en/start/index.md
@@ -81,6 +81,8 @@ npm i simple-mind-map
## Usage
+> The `web` directory of this repository provides a complete project based on `Vue2`. If you encounter any doubts about using it, you can refer to the implementation of this project.
+
```html
```
diff --git a/web/src/pages/Doc/en/start/index.vue b/web/src/pages/Doc/en/start/index.vue
index d4b4f27c..41a21187 100644
--- a/web/src/pages/Doc/en/start/index.vue
+++ b/web/src/pages/Doc/en/start/index.vue
@@ -57,6 +57,9 @@ compile this dependency:
Other projects should modify the packaging configuration as needed.
Usage
+
+The web directory of this repository provides a complete project based on Vue2. If you encounter any doubts about using it, you can refer to the implementation of this project.
+
<div id="mindMapContainer"></div>
import MindMap from "simple-mind-map";
diff --git a/web/src/pages/Doc/zh/changelog/index.md b/web/src/pages/Doc/zh/changelog/index.md
index 74d872ea..ec994eba 100644
--- a/web/src/pages/Doc/zh/changelog/index.md
+++ b/web/src/pages/Doc/zh/changelog/index.md
@@ -2,6 +2,22 @@
## 0.5.0
+这个版本主要是代码层面的改动和优化,核心是为了提升渲染性能,减少卡顿问题。
+
+新增:1.支持自定义展开收起节点图标和颜色;
+
+优化:1.优化渲染逻辑,设置主题、前进回退等操作不再全量渲染;
+
+ 2.优化节点拖拽逻辑,修复无法拖动到两个节点之间的问题;
+
+ 3.收起全部节点操作增加回到中心点的逻辑;
+
+ 4.修复短时间多次触发渲染造成节点乱飞和错乱的问题;
+
+ 5.优化节点编辑的体验;
+
+修复:1.修复setData方法不触发历史记录的问题;
+
修改:从0.5.0版本开始,考虑性能问题,节点激活状态只能修改形状相关的样式:
```js
diff --git a/web/src/pages/Doc/zh/changelog/index.vue b/web/src/pages/Doc/zh/changelog/index.vue
index ddec7914..ec0930a2 100644
--- a/web/src/pages/Doc/zh/changelog/index.vue
+++ b/web/src/pages/Doc/zh/changelog/index.vue
@@ -2,6 +2,18 @@
Changelog
0.5.0
+这个版本主要是代码层面的改动和优化,核心是为了提升渲染性能,减少卡顿问题。
+新增:1.支持自定义展开收起节点图标和颜色;
+优化:1.优化渲染逻辑,设置主题、前进回退等操作不再全量渲染;
+ 2.优化节点拖拽逻辑,修复无法拖动到两个节点之间的问题;
+
+ 3.收起全部节点操作增加回到中心点的逻辑;
+
+ 4.修复短时间多次触发渲染造成节点乱飞和错乱的问题;
+
+ 5.优化节点编辑的体验;
+
+修复:1.修复setData方法不触发历史记录的问题;
修改:从0.5.0版本开始,考虑性能问题,节点激活状态只能修改形状相关的样式:
[
'fillColor',
diff --git a/web/src/pages/Doc/zh/constructor/index.md b/web/src/pages/Doc/zh/constructor/index.md
index dbd8f4b6..7e0af828 100644
--- a/web/src/pages/Doc/zh/constructor/index.md
+++ b/web/src/pages/Doc/zh/constructor/index.md
@@ -46,6 +46,8 @@ const mindMap = new MindMap({
| mousewheelMoveStep(v0.4.3+) | Number | 100 | 当`mousewheelAction`设为`move`时,可以通过该属性控制鼠标滚动一下视图移动的步长,单位`px` | |
| defaultInsertSecondLevelNodeText(v0.4.7+) | String | 二级节点 | 默认插入的二级节点的文字 | |
| defaultInsertBelowSecondLevelNodeText(v0.4.7+) | String | 分支主题 | 默认插入的二级以下节点的文字 | |
+| expandBtnStyle(v0.5.0+) | Object | { color: '#808080', fill: '#fff' } | 展开收起按钮的颜色 | |
+| expandBtnIcon(v0.5.0+) | Object | { open: '', close: '' } | 自定义展开收起按钮的图标,可以传图标的svg字符串 | |
### 水印配置
diff --git a/web/src/pages/Doc/zh/constructor/index.vue b/web/src/pages/Doc/zh/constructor/index.vue
index 26ff8c5e..1495d614 100644
--- a/web/src/pages/Doc/zh/constructor/index.vue
+++ b/web/src/pages/Doc/zh/constructor/index.vue
@@ -182,6 +182,20 @@
默认插入的二级以下节点的文字
+
+expandBtnStyle(v0.5.0+)
+Object
+{ color: '#808080', fill: '#fff' }
+展开收起按钮的颜色
+
+
+
+expandBtnIcon(v0.5.0+)
+Object
+{ open: '', close: '' }
+自定义展开收起按钮的图标,可以传图标的svg字符串
+
+
水印配置
diff --git a/web/src/pages/Doc/zh/introduction/index.md b/web/src/pages/Doc/zh/introduction/index.md
index e1858784..c2f22e22 100644
--- a/web/src/pages/Doc/zh/introduction/index.md
+++ b/web/src/pages/Doc/zh/introduction/index.md
@@ -1,6 +1,6 @@
# 简介
-`simple-mind-map`是一个简单&强大的Web思维导图库,不依赖任何特定框架。
+`simple-mind-map`是一个简单&强大的Web思维导图库,不依赖任何特定框架。可以帮助你快速开发思维导图产品。
## 特性
@@ -14,19 +14,19 @@
- [x] 支持右键和Ctrl+左键两种多选方式
- [x] 支持节点自由拖拽、拖拽调整
- [x] 支持多种节点形状
-- [x] 支持导出为`json`、`png`、`svg`、`pdf`,支持从`json`、`xmind`导入
+- [x] 支持导出为`json`、`png`、`svg`、`pdf`、`markdown`,支持从`json`、`xmind`、`markdown`导入
- [x] 支持小地图、支持水印
- [x] 支持关联线
-## 目录介绍
+## 仓库目录介绍
1.`simple-mind-map`
-思维导图工具库,框架无关,`Vue`、`React`等框架或无框架都可以使用。
+思维导图库,框架无关,`Vue`、`React`等框架或无框架都可以使用。
2.`web`
-使用`simple-mind-map`工具库,基于`vue2.x`、`ElementUI`搭建的在线思维导图。特性:
+使用`simple-mind-map`库,基于`vue2.x`、`ElementUI`搭建的在线思维导图。特性:
- [x] 工具栏,支持插入节点、删除节点;编辑节点图片、图标、超链接、备注、标签、概要
- [x] 侧边栏,基础样式设置面板、节点样式设置面板、大纲面板、主题选择面板、结构选择面板
@@ -52,7 +52,11 @@
## 特别说明
-本项目较粗糙,未进行完整测试,功能尚不是很完善,性能也存在一些问题,尤其当节点数量比较庞大的时候,仅用于学习和参考,请谨慎用于实际项目。
+本项目可用于学习和参考,用于实际项目时请先深度体验一下是否能满足您的需求。
+
+本项目可能没有完整测试到每一个功能点,所以可能存在bug,另外,当节点数量非常多的时候,性能也存在一些问题,因为每个人能接受的卡顿程度不一样,所以你可以自行测试节点数量上限。
+
+如果有建议或发现了bug,可以在此提交[issues](https://github.com/wanglin2/mind-map/issues)。
项目内置的主题和图标来自于:
diff --git a/web/src/pages/Doc/zh/introduction/index.vue b/web/src/pages/Doc/zh/introduction/index.vue
index 1fa5c990..efaad664 100644
--- a/web/src/pages/Doc/zh/introduction/index.vue
+++ b/web/src/pages/Doc/zh/introduction/index.vue
@@ -1,34 +1,34 @@
简介
-simple-mind-map是一个简单&强大的Web思维导图库,不依赖任何特定框架。
+simple-mind-map是一个简单&强大的Web思维导图库,不依赖任何特定框架。可以帮助你快速开发思维导图产品。
特性
-
-
-
-
-
-
-
-
-
-
-json、png、svg、pdf,支持从json、xmind导入
-
-
+
+
+
+
+
+
+
+
+
+
+json、png、svg、pdf、markdown,支持从json、xmind、markdown导入
+
+
-目录介绍
+仓库目录介绍
1.simple-mind-map
-思维导图工具库,框架无关,Vue、React等框架或无框架都可以使用。
+思维导图库,框架无关,Vue、React等框架或无框架都可以使用。
2.web
-使用simple-mind-map工具库,基于vue2.x、ElementUI搭建的在线思维导图。特性:
+使用simple-mind-map库,基于vue2.x、ElementUI搭建的在线思维导图。特性:
-
-
-
-
-
+
+
+
+
+
提供文档页面服务。
3.dist
@@ -39,7 +39,9 @@
特别说明
-本项目较粗糙,未进行完整测试,功能尚不是很完善,性能也存在一些问题,尤其当节点数量比较庞大的时候,仅用于学习和参考,请谨慎用于实际项目。
+本项目可用于学习和参考,用于实际项目时请先深度体验一下是否能满足您的需求。
+本项目可能没有完整测试到每一个功能点,所以可能存在bug,另外,当节点数量非常多的时候,性能也存在一些问题,因为每个人能接受的卡顿程度不一样,所以你可以自行测试节点数量上限。
+如果有建议或发现了bug,可以在此提交issues。
项目内置的主题和图标来自于:
diff --git a/web/src/pages/Doc/zh/node/index.md b/web/src/pages/Doc/zh/node/index.md
index 592823ef..0c25c4de 100644
--- a/web/src/pages/Doc/zh/node/index.md
+++ b/web/src/pages/Doc/zh/node/index.md
@@ -56,21 +56,13 @@
## 方法
-### addChildren(node)
-
-添加子节点
-
### getSize()
-计算节点的宽高,返回一个布尔值,代表是否宽高发生了变化
-
-### renderNode()
-
-渲染节点到画布,会移除旧的内容节点,创建新的
+通过重新创建节点内容更新节点的宽高,返回一个布尔值,代表是否宽高发生了变化
### render()
-递归渲染该节点及其所有子节点,第一次调用会创建节点内容,后续只会更新节点位置,想要重新渲染内容,可以先把`initRender`属性设为`true`
+递归渲染该节点及其所有子节点
### updateNodeShape()
@@ -80,7 +72,13 @@
### remove()
-递归删除该节点及其所有子节点
+递归删除,只是从画布删除,节点容器还在,后续还可以重新插回画布
+
+### destroy()
+
+> v0.5.0+
+
+销毁节点,不但会从画布删除,而且原节点直接置空,后续无法再插回画布
### renderLine()
diff --git a/web/src/pages/Doc/zh/node/index.vue b/web/src/pages/Doc/zh/node/index.vue
index 61e96859..bdc643fc 100644
--- a/web/src/pages/Doc/zh/node/index.vue
+++ b/web/src/pages/Doc/zh/node/index.vue
@@ -31,21 +31,22 @@
节点是否正在拖拽中
方法
-addChildren(node)
-添加子节点
getSize()
-计算节点的宽高,返回一个布尔值,代表是否宽高发生了变化
-renderNode()
-渲染节点到画布,会移除旧的内容节点,创建新的
+通过重新创建节点内容更新节点的宽高,返回一个布尔值,代表是否宽高发生了变化
render()
-递归渲染该节点及其所有子节点,第一次调用会创建节点内容,后续只会更新节点位置,想要重新渲染内容,可以先把initRender属性设为true
+递归渲染该节点及其所有子节点
updateNodeShape()
v0.5.0+
更新节点形状节点。比如当节点状态改变后,调用该方法显示或取消激活样式。
remove()
-递归删除该节点及其所有子节点
+递归删除,只是从画布删除,节点容器还在,后续还可以重新插回画布
+destroy()
+
+v0.5.0+
+
+销毁节点,不但会从画布删除,而且原节点直接置空,后续无法再插回画布
renderLine()
重新渲染该节点到其子节点之间的连线
removeLine()
diff --git a/web/src/pages/Doc/zh/start/index.md b/web/src/pages/Doc/zh/start/index.md
index 05147e31..30ef4e0e 100644
--- a/web/src/pages/Doc/zh/start/index.md
+++ b/web/src/pages/Doc/zh/start/index.md
@@ -72,6 +72,8 @@ npm i simple-mind-map
## 使用
+> 本仓库的`web`目录提供了一个基于`Vue2`的完整项目,如果你遇到了一些使用上的疑惑,可以参考该项目的实现。
+
```html
```
diff --git a/web/src/pages/Doc/zh/start/index.vue b/web/src/pages/Doc/zh/start/index.vue
index 53e6a993..fa8eb70c 100644
--- a/web/src/pages/Doc/zh/start/index.vue
+++ b/web/src/pages/Doc/zh/start/index.vue
@@ -47,6 +47,9 @@ npm run build
其他项目请自行修改打包配置。
使用
+
+本仓库的web目录提供了一个基于Vue2的完整项目,如果你遇到了一些使用上的疑惑,可以参考该项目的实现。
+
<div id="mindMapContainer"></div>
import MindMap from "simple-mind-map";