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 @@

Changelog

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:

[
   '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 @@