{"id":21735625,"url":"https://github.com/blryli/canvas-flows","last_synced_at":"2025-04-13T01:52:48.347Z","repository":{"id":47572614,"uuid":"141555494","full_name":"blryli/canvas-flows","owner":"blryli","description":"canves实现的流程图组件","archived":false,"fork":false,"pushed_at":"2020-04-03T02:09:57.000Z","size":776,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-13T01:52:39.091Z","etag":null,"topics":["canvas","flow","step","vue","vuejs","vuejs2"],"latest_commit_sha":null,"homepage":"https://blryli.github.io/canvas-flows/","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/blryli.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":"2018-07-19T09:22:19.000Z","updated_at":"2022-07-21T01:56:13.000Z","dependencies_parsed_at":"2022-07-22T06:18:00.251Z","dependency_job_id":null,"html_url":"https://github.com/blryli/canvas-flows","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/blryli%2Fcanvas-flows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blryli%2Fcanvas-flows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blryli%2Fcanvas-flows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blryli%2Fcanvas-flows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blryli","download_url":"https://codeload.github.com/blryli/canvas-flows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654054,"owners_count":21140235,"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":["canvas","flow","step","vue","vuejs","vuejs2"],"created_at":"2024-11-26T05:13:52.664Z","updated_at":"2025-04-13T01:52:48.315Z","avatar_url":"https://github.com/blryli.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# canvas-flows\n\n\u003e A canvas flows project\n\n## 项目演示\n\n[演示地址](https://blryli.github.io/canvas-flows/)\n\n## 安装\n\n``` Bash\nnpm install canvas-flows -S\n```\n\n## 使用\n\n```js\n//ES6\nimport canvasFlows from 'canvas-flows'\nVue.use(canvasFlows)\n\n// require\nvar canvasFlows = require('canvasFlows')\n\n\n// 或者直接使用script导入\n\u003cscript src=\"https://unpkg.com/canvas-flows/dist/canvas-flows.js\"\u003e\u003c/script\u003e\n```\n\n```html\n\u003cflows v-model=\"config\"\u003e\u003c/flows\u003e\n```\n\n```js\n\u003cscript\u003e\nexport default {\n  data () {\n    return {\n      config: {\n        nodes: [\n          { id: -1, name: \"NEW 1\" },\n          { id: -2, name: \"NEW 2\" },\n          { id: -3, name: \"NEW 3\" },\n          { id: -4, name: \"NEW 4\" },\n          { id: -5, name: \"NEW 5\" },\n          { id: -6, name: \"NEW 6\" },\n          { id: -7, name: \"NEW 7\" }\n        ],\n        sequenceFlows: [\n          { sourceRef: 3, targetRef: -1 },\n          { sourceRef: -1, targetRef: -2 },\n          { sourceRef: -1, targetRef: -3 },\n          { sourceRef: -1, targetRef: -4 },\n          { sourceRef: -1, targetRef: -6 },\n          { sourceRef: -2, targetRef: -5 },\n          { sourceRef: -3, targetRef: -5 },\n          { sourceRef: -4, targetRef: -5 },\n          { sourceRef: -6, targetRef: -5 }\n        ]\n      }\n    }\n  }\n}\n\u003c/script\u003e\n```\n\n### Props\n\n|    name    |    Description   |   type   |default|\n| -----------------  | ---------------- | :--------: | :----------: |\n| value       | 数据 |Object| {}\n| nodeWidth        | 节点默认宽度 |Number | 100\n| nodeHeight        | 节点默高度 |Number | 30\n| offsetX        | 节点间横向间隔 |Number | 12\n| offsetY        | 节点间纵向间隔 |Number | 80\n| useInputaEdit        | 是否启用编辑框 |Boolean | true\n| fristNodeOnly        | 首节点唯一，即首节点不可被连接或删除 |Boolean | true\n| readonly        | 展示模式(不可编辑) |Boolean | false\n| finishNodes        | 已完成节点(展示模式可用) |Array | []\n\n### Methods\n\n|  事件名 |    说明           |   参数      |\n|--------|------             |------       |\n|add     |不传参数默认添加到顶级节点，传入id则从此id处向下添加节点       |    id   |\n|next    |从id处向下添加子节点 |id           |\n|deleteDot|删除点             |id           |\n|deleteLine|删除线            |id           |\n\n### Events\n\n|  事件名 |    说明           |   回调参数      |\n|--------|------             |------          |\n|check  |单击节点时触发        |-- 节点ID       |\n|link  |连接节点时触发        |-- {form: name, to: name}       |\n|edit    |双击节点时触发       |   节点对象          |\n|delete|删除节点时触发         |  节点ID           |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblryli%2Fcanvas-flows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblryli%2Fcanvas-flows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblryli%2Fcanvas-flows/lists"}