diff --git a/apps/mind-map/README.md b/apps/mind-map/README.md new file mode 100644 index 00000000..90d12f3e --- /dev/null +++ b/apps/mind-map/README.md @@ -0,0 +1,90 @@ +

Simple mind map

+ +[![npm-version](https://img.shields.io/npm/v/simple-mind-map)](https://www.npmjs.com/package/simple-mind-map) +![npm download](https://img.shields.io/npm/dm/simple-mind-map) +[![GitHub stars](https://img.shields.io/github/stars/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/stargazers) +[![GitHub issues](https://img.shields.io/github/issues/wanglin2/mind-map)](https://github.com/wanglin2/mind-map/issues) +[![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思维导图 + +本项目包含两部分: + +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/)。 + +另外也提供了客户端可供下载使用,支持`Windows`、`Mac`及`Linux`,下载地址: + +Github:[releases](https://github.com/wanglin2/mind-map/releases)。 + +百度云盘:[地址](https://pan.baidu.com/s/1huasEbKsGNH2Af68dvWiOg?pwd=3bp3)。 + +# 特性 + +- [x] 插件化架构,除核心功能外,其他功能作为插件提供,按需使用,减小打包体积 +- [x] 支持逻辑结构图、思维导图、组织结构图、目录组织图、时间轴(横向、竖向)、鱼骨图等结构 +- [x] 内置多种主题,允许高度自定义样式,支持注册新主题 +- [x] 节点内容支持文本(普通文本、富文本)、图片、图标、超链接、备注、标签、概要 +- [x] 节点支持拖拽(拖拽移动、自由调整)、多种节点形状,支持使用 DDM 完全自定义节点内容 +- [x] 支持画布拖动、缩放 +- [x] 支持鼠标按键拖动选择和Ctrl+左键两种多选节点方式 +- [x] 支持导出为`json`、`png`、`svg`、`pdf`、`markdown`、`xmind`,支持从`json`、`xmind`、`markdown`导入 +- [x] 支持快捷键、前进后退、关联线、搜索替换、小地图、水印 +- [x] 提供丰富的配置,满足各种场景各种使用习惯 + +# 安装 + +```bash +npm i simple-mind-map +``` + +# 使用 + +提供一个宽高不为0的容器元素: + +```html +
+``` + +另外再设置一下`css`样式: + +```css +#mindMapContainer * { + margin: 0; + padding: 0; +} +``` + +然后创建一个实例: + +```js +import MindMap from "simple-mind-map"; + +const mindMap = new MindMap({ + el: document.getElementById('mindMapContainer'), + data: { + "data": { + "text": "根节点" + }, + "children": [] + } +}); +``` + +即可得到一个思维导图。 + +想要实现更多功能?可以查看[开发文档](https://wanglin2.github.io/mind-map/#/doc/zh/)。 + +# License + +[MIT](https://github.com/wanglin2/mind-map/blob/main/LICENSE) + +# 微信交流群 + +群聊人数较多,无法通过二维码入群,可以微信添加`wanglinguanfang`拉你入群。 diff --git a/apps/mind-map/data.yml b/apps/mind-map/data.yml new file mode 100644 index 00000000..fa78cc77 --- /dev/null +++ b/apps/mind-map/data.yml @@ -0,0 +1,20 @@ +name: Simple mind map +tags: + - 工具 +title: 一个还算强大的 Web 思维导图 +type: 工具 +description: 一个还算强大的 Web 思维导图 +additionalProperties: + key: mind-map + name: Simple mind map + tags: + - Tool + shortDescZh: 一个还算强大的 Web 思维导图 + shortDescEn: A relatively powerful web mind map + type: tool + crossVersionUpdate: true + limit: 0 + recommend: 0 + website: https://wanglin2.github.io/mind-map + github: https://github.com/wanglin2/mind-map + document: https://wanglin2.github.io/mind-map/#/doc/zh/ diff --git a/apps/mind-map/latest/.env.sample b/apps/mind-map/latest/.env.sample new file mode 100644 index 00000000..47c36e36 --- /dev/null +++ b/apps/mind-map/latest/.env.sample @@ -0,0 +1,2 @@ +CONTAINER_NAME="mind-map" +PANEL_APP_PORT_HTTP="40147" diff --git a/apps/mind-map/latest/data.yml b/apps/mind-map/latest/data.yml new file mode 100644 index 00000000..438c363b --- /dev/null +++ b/apps/mind-map/latest/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 40147 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number diff --git a/apps/mind-map/latest/docker-compose.yml b/apps/mind-map/latest/docker-compose.yml new file mode 100644 index 00000000..aa0da738 --- /dev/null +++ b/apps/mind-map/latest/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' +services: + mind-map: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + ports: + - "${PANEL_APP_PORT_HTTP}:80" + image: liwangsheng/mind-map:latest + labels: + createdBy: "Apps" + +networks: + 1panel-network: + external: true diff --git a/apps/mind-map/logo.png b/apps/mind-map/logo.png new file mode 100644 index 00000000..64bee6d2 Binary files /dev/null and b/apps/mind-map/logo.png differ