vue原生实现拖拽可视化流程图连线代码
代码语言:html
所属分类:拖放
代码描述:vue原生实现拖拽可视化流程图连线代码,可导出json格式,并且可加载。
代码标签: vue 原生 实现 拖拽 可视化 流程图 连线 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Vue Drag and Drop Flowchart</title> <style> body { font-family: Arial, sans-serif; -webkit-user-select: none; /* Safari */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* IE/Edge */ user-select: none; /* 标准语法 */ } .container { position: relative; width: 200vw; height: 80vh; background-color: #f0f0f0; overflow: hidden; } .parat{ font-size: 10px; padding: 6px; } .node { position: absolute; width: 200px; height: auto; background-color: #fff; border: 1px solid #ccc; box-shadow: 2px 2px 3px rgba(0,0,0,0.1); } .node .title{ padding: 10px; background: #2596cc; cursor: grab; text-align: center; color: white; } .connector { width: 20px; height: 20px; background-color: red; position: absolute; cursor: pointer; } .connector-left { left: -5px; top: 20px; transform: translateY(-50%); } .connector-right { right: -5px; top: 50%; transform: translateY(-50%); } svg { position: absolute; top: 0; left: 0; overflow: visible; } path { stroke: black; stroke-width: 2; fill: none; } .tool-bar { height: 20vh; padding: 10px; background-color: #EEE; } </style> </head> <body> <div id="app"> <div class="container" .........完整代码请登录后点击上方下载按钮下载查看
网友评论0