From 21f487321aee1f007cf95c777ef276cfcb1ad263 Mon Sep 17 00:00:00 2001 From: wanglin2 <1013335014@qq.com> Date: Mon, 10 Apr 2023 22:08:26 +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 | 12 ++- index.html | 2 +- web/src/pages/Doc/en/miniMap/index.md | 8 +- web/src/pages/Doc/en/miniMap/index.vue | 8 +- web/src/pages/Doc/zh/course11/index.md | 27 ++++- web/src/pages/Doc/zh/course11/index.vue | 17 +++- web/src/pages/Doc/zh/course12/index.md | 33 +++++- web/src/pages/Doc/zh/course12/index.vue | 21 +++- web/src/pages/Doc/zh/course13/index.md | 130 +++++++++++++++++++++++- web/src/pages/Doc/zh/course13/index.vue | 115 ++++++++++++++++++++- web/src/pages/Doc/zh/course14/index.md | 53 +++++++++- web/src/pages/Doc/zh/course14/index.vue | 36 ++++++- web/src/pages/Doc/zh/miniMap/index.md | 8 +- web/src/pages/Doc/zh/miniMap/index.vue | 8 +- 14 files changed, 447 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 1d2a11b9..001334b2 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,18 @@ [![GitHub forks](https://img.shields.io/github/forks/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/network/members) ![license](https://img.shields.io/npm/l/express.svg) -> 一个简单&强大的Web思维导图库,不依赖任何框架。 +> 一个简单&强大的Web思维导图 -在线Demo:[https://wanglin2.github.io/mind-map/](https://wanglin2.github.io/mind-map/) +本项目包含两部分: + +1.一个js思维导图库,不依赖任何框架,你可以使用它来快速完成Web思维导图产品的开发。 开发文档:[https://wanglin2.github.io/mind-map/#/doc/zh/](https://wanglin2.github.io/mind-map/#/doc/zh/) +2.一个Web思维导图,基于思维导图库、Vue2.x、ElementUI开发,可以操作电脑本地文件,所以你可以直接把它当做一个在线版思维导图应用使用,如果觉得github的响应速度慢,你也可以部署到你的服务器上。 + +在线地址:[https://wanglin2.github.io/mind-map/](https://wanglin2.github.io/mind-map/) + # 特性 - [x] 插件化架构,除核心功能外,其他功能作为插件提供,按需使用,减小打包体积 @@ -72,8 +78,6 @@ const mindMap = new MindMap({ 想要实现更多功能?可以查看[开发文档](https://wanglin2.github.io/mind-map/#/doc/zh/)。 -仓库内附带一个基于`Vue2.x`的全功能demo,可以解决你大部分功能实现上的困惑。 - # License MIT diff --git a/index.html b/index.html index 68d1965e..dbc59c96 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -一个简单的web思维导图实现
\ No newline at end of file +一个简单的web思维导图实现
\ No newline at end of file diff --git a/web/src/pages/Doc/en/miniMap/index.md b/web/src/pages/Doc/en/miniMap/index.md index 0e82ce40..495ab5f8 100644 --- a/web/src/pages/Doc/en/miniMap/index.md +++ b/web/src/pages/Doc/en/miniMap/index.md @@ -54,13 +54,13 @@ positioning, set border style, transition property (optional) 4.Listen for `data_change` and `view_data_change` events, and in this event call the `calculationMiniMap` method to get calculation data, then render `svgHTML` -to the `miniMapContainer` element and set its style: +to the `miniMapContainer` element and set `miniMapContainer` element style: ```js :style="{ - transform: `scale(${svgBoxScale})`, - left: svgBoxLeft + 'px', - top: svgBoxTop + 'px', + transform: `scale(${miniMapBoxScale})`, + left: miniMapBoxLeft + 'px', + top: miniMapBoxTop + 'px', }" ``` diff --git a/web/src/pages/Doc/en/miniMap/index.vue b/web/src/pages/Doc/en/miniMap/index.vue index d8be49ff..75b18097 100644 --- a/web/src/pages/Doc/en/miniMap/index.vue +++ b/web/src/pages/Doc/en/miniMap/index.vue @@ -39,11 +39,11 @@ absolute positioning

positioning, set border style, transition property (optional)

4.Listen for data_change and view_data_change events, and in this event call the calculationMiniMap method to get calculation data, then render svgHTML -to the miniMapContainer element and set its style:

+to the miniMapContainer element and set miniMapContainer element style:

:style="{
-    transform: `scale(${svgBoxScale})`,
-    left: svgBoxLeft + 'px',
-    top: svgBoxTop + 'px',
+    transform: `scale(${miniMapBoxScale})`,
+    left: miniMapBoxLeft + 'px',
+    top: miniMapBoxTop + 'px',
 }"
 

5.Set the viewBoxStyle object as the style of the viewBoxContainer element

diff --git a/web/src/pages/Doc/zh/course11/index.md b/web/src/pages/Doc/zh/course11/index.md index 9856a3d4..bc705990 100644 --- a/web/src/pages/Doc/zh/course11/index.md +++ b/web/src/pages/Doc/zh/course11/index.md @@ -1,3 +1,28 @@ # 结构 -编写中。。。 \ No newline at end of file +`simple-mind-map`目前支持四种结构:logicalStructure(逻辑结构图)、mindMap(思维导图)、organizationStructure(组织结构图)、catalogOrganization(目录组织图)。 + +可以在实例化`simple-mind-map`时通过选项指定使用的结构: + +```js +new MindMap({ + // ... + layout: 'logicalStructure' +}) +``` + +也可以动态切换结构: + +```js +mindMap.setLayout('organizationStructure') +``` + +获取当前使用的结构可以使用`getLayout`方法: + +```js +const layout = mindMap.getLayout() +``` + +## 完整示例 + +