index.html
<!DOCTYPE html>
<html lang="zh">
<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>Document</title>
<style>
table,tr,td, th{
border: 1px solid #ccc;
text-align: center;
}
th{
background: #eee;
}
tr{
background: #fff;
}
table{
border-collapse:collapse;
width: 100%;
}
table.drag-active tr *{
user-select: none;
}
.t-row.active{
opacity: .5;
}
.helper td{
background-color: rgba(0, 137, 255, 0.2);
}
.option{
padding: 0 1em;
width: 4em;
}
.move{
font-style: normal;
float: right;
padding: 0 .5em;
cursor: move;
}
</style>
</head>
<body>
<div class="root"></div>
<script src="./index.js"></script>
</body>
</html>
index.js