drawflow.js实现一个拖拽绘制流程图效果代码
代码语言:html
所属分类:其他
代码描述:drawflow.js实现一个拖拽绘制流程图效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Drawflow | Simple Flow program libray</title>
<meta name="description" content="Simple library for flow programming. Drawflow allows you to create data flows easily and quickly.">
</head>
<body>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/drawflow.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js" integrity="sha256-KzZiKy0DWYsnwMF+X1DvQngQ2/FxF7MF3Ff72XcpuPs=" crossorigin="anonymous"></script>
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/drawflow.min.css">
<style>
:root {
--border-color: #cacaca;
--background-color: #ffffff;
--background-box-title: #f7f7f7;
}
html, body {
margin: 0px;
padding: 0px;
width: 100vw;
height: 100vh;
overflow: hidden;
font-family: 'Roboto', sans-serif;
}
header {
height: 66px;
border-bottom: 1px solid var(--border-color);
padding-left: 20px;
}
header h2 {
margin: 0px;
line-height: 66px;
}
header a {
color: black;
}
.them-edit-link {
position: absolute;
top: 10px;
right: 100px;
color: black;
font-size: 40px;
}
.them-edit-link a {
text-decoration: none;
}
.github-link{
position: absolute;
top: 10px;
right: 20px;
color: black;
}
.wrapper {
width: 100%;
height: calc(100vh - 67px);
display: flex;
}
.col {
overflow: auto;
width: 300px;
height: 100%;
border-right: 1px solid var(--border-color);
}
.drag-drawflow {
line-height: 50px;
border-bottom: 1px solid var(--border-color);
padding-left: 20px;
cursor: move;
user-select: none;
}
.menu {
position: absolute;
height: 40px;
display: block;
background: white;
width: 100%;
}
.menu ul {
padding: 0px;
margin: 0px;
line-height: 40px;
}
.menu ul li {
display: inline-block;
margin-left: 10px;
border-right: 1px solid var(--border-color);
padding-right: 10px;
line-height: 40px;
cursor: pointer;
}
.menu ul li.selected {
font-weight: bold;
}
.btn-export {
float: right;
position: absolute;
top: 10px;
right: 10px;
color: white;
font-weight: bold;
border: 1px solid #0e5ba3;
background: #4ea9ff;
padding: 5px 10px;
border-radius: 4px;
cursor: pointer;
z-index: 5;
}
.btn-clear {
float: right;
position: absolute;
top: 10px;
right: 85px;
color: white;
font-weight: bold;
border: 1px solid #96015b;
background: #e3195a;
padding: 5px 10px;
border-radius: 4px;
cursor: pointer;
z-index: 5;
}
.swal-wide{
width:80% !important;
}
.btn-lock {
float: right;
position: absolute;
bottom: 10px;
right: 140px;
display: flex;
font-size: 24px;
color: white;
padding: 5px 10px;
background: #555555;
border-radius: 4px;
border-right: 1px solid var(--border-color);
z-index: 5;
cursor: pointer;
}
.bar-zoom {
float: right;
position: absolute;
bottom: 10px;
right: 10px;
display: flex;
font-size: 24px;
color: white;
padding: 5px 10px;
background: #555555;
border-radius: 4px;
border-right: 1px solid var(--border-color);
z-index: 5;
}
.bar-zoom svg {
cursor: pointer;
padding-left: 10px;
}
.bar-zoom svg:nth-child(1) {
padding-left: 0px;
}
#drawflow {
position: relative;
width: calc(100vw - .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0