{"id":22490575,"url":"https://github.com/hellowuxin/mindmap","last_synced_at":"2025-08-02T22:33:14.387Z","repository":{"id":43958893,"uuid":"234497388","full_name":"hellowuxin/mindmap","owner":"hellowuxin","description":"Mindmap component for Vue2","archived":true,"fork":false,"pushed_at":"2022-01-15T06:03:49.000Z","size":14058,"stargazers_count":464,"open_issues_count":31,"forks_count":123,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-05-02T14:52:08.964Z","etag":null,"topics":["d3js","mindmap","typescript","vue","vue-component"],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hellowuxin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-17T07:43:06.000Z","updated_at":"2024-03-20T02:01:48.000Z","dependencies_parsed_at":"2022-09-06T08:10:16.229Z","dependency_job_id":null,"html_url":"https://github.com/hellowuxin/mindmap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellowuxin%2Fmindmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellowuxin%2Fmindmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellowuxin%2Fmindmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellowuxin%2Fmindmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellowuxin","download_url":"https://codeload.github.com/hellowuxin/mindmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228501340,"owners_count":17930233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["d3js","mindmap","typescript","vue","vue-component"],"created_at":"2024-12-06T17:22:22.214Z","updated_at":"2024-12-06T17:25:22.692Z","avatar_url":"https://github.com/hellowuxin.png","language":"Vue","readme":"\u003cimg src=\"./public/mindmap.jpg\" width=\"300\"/\u003e\n\n# 思维导图Vue2组件 ![npm](https://img.shields.io/npm/v/@hellowuxin/mindmap) ![npm](https://img.shields.io/npm/dm/@hellowuxin/mindmap)\n\n\u003e 一个由[MindNode](https://mindnode.com)启发的思维导图Vue组件，基于d3.js实现  \n\u003e 目前实现的功能有基本的编辑、拖移、缩放、撤销、上下文菜单、折叠...\n\n## 近期更新\n\n\u003e 该项目基本不会再维护  \n\u003e 目前正在开发Vue3、d3v6版本的[思维导图组件](https://github.com/hellowuxin/vue3-mindmap)，欢迎支持\n\n## 安装\n\n```sh\nnpm install @hellowuxin/mindmap\n```\n\n## PROPS\n\n| Name        | Type   | Default   | Description          |\n| ---         | ---    | ---       | ---                  |\n| v-model     | Array  | undefined | 设置思维导图数据        |\n| width       | Number | 100%      | 设置组件宽度           |\n| height      | Number | undefined | 设置组件高度           |\n| xSpacing    | Number | 80        | 设置节点横向间隔        |\n| ySpacing    | Number | 20        | 设置节点纵向间隔        |\n| strokeWidth | Number | 4         | 设置连线的宽度          |\n| draggable   | Boolean| true      | 设置节点是否可拖拽      |\n| gps         | Boolean| true      | 是否显示居中按钮        |\n| fitView     | Boolean| true      | 是否显示缩放按钮        |\n| showNodeAdd | Boolean| true      | 是否显示添加节点按钮     |\n| keyboard    | Boolean| true      | 是否响应键盘事件        |\n| contextMenu | Boolean| true      | 是否响应右键菜单        |\n| zoomable    | Boolean| true      | 是否可缩放、拖移        |\n| showUndo    | Boolean| true      | 是否显示撤销重做按钮     |\n| download    | Boolean| true      | 是否显示下载按钮        |\n\n## EVENTS\n\n| Name           | arguments | Description                    |\n| ---            | ---       | ---                            |\n| updateNodeName | data, id  | 更新节点名称时，传入节点数据和节点id |\n| click          | data, id  | 点击节点时，传入节点数据和节点id    |\n\n## 样例\n\n```html\n\u003ctemplate\u003e\n  \u003cmindmap v-model=\"data\"\u003e\u003c/mindmap\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport mindmap from '@hellowuxin/mindmap'\n\nexport default {\n  components: { mindmap },\n  data: () =\u003e ({\n    data: [{\n      \"name\":\"如何学习D3\",\n      \"children\": [\n        {\n          \"name\":\"预备知识\",\n          \"children\": [\n            { \"name\":\"HTML \u0026 CSS\" },\n            { \"name\":\"JavaScript\" },\n            ...\n          ]\n        },\n        {\n          \"name\":\"安装\",\n          \"_children\": [\n            { \"name\": \"折叠节点\" }\n          ]\n        },\n        {\n          \"name\":\"进阶\",\n          \"left\": true\n        },\n        ...\n      ]\n    }]\n  })\n}\n\u003c/script\u003e\n```\n\n## 键盘事件\n\n\u003ckbd\u003e⇥ tab\u003c/kbd\u003e、\u003ckbd\u003e⏎ enter\u003c/kbd\u003e、\u003ckbd\u003e⌫ backspace\u003c/kbd\u003e、\u003ckbd\u003e⌘ cmd\u003c/kbd\u003e+\u003ckbd\u003ez\u003c/kbd\u003e、\u003ckbd\u003e⌘ cmd\u003c/kbd\u003e+\u003ckbd\u003ey\u003c/kbd\u003e\n\n## 交互逻辑\n\n**鼠标**：space+左键移动、右键菜单、ctrl+滚轮缩放、左键选中\n\n**触控板**：双指滚动移动、双指菜单、双指捏合缩放、单指选中\n\n## 待解决\n\n- [ ] 导出多种格式\n- [ ] 设置节点的宽高\n- [ ] 多个根节点\n- [ ] ...\n","funding_links":[],"categories":["Vue"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellowuxin%2Fmindmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellowuxin%2Fmindmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellowuxin%2Fmindmap/lists"}