1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2026-03-04 03:50:41 +08:00

实现了基本的通过拖拽变更结构的能力

This commit is contained in:
shangbin
2021-09-06 15:41:21 +08:00
parent 9088c03bec
commit afb6a0c84f
10 changed files with 255 additions and 249 deletions

106
src/assets/nestable.css Normal file
View File

@@ -0,0 +1,106 @@
/*
* Style for nestable
*/
.nestable {
position: relative;
}
.nestable-rtl {
direction: rtl;
}
.nestable .nestable-list {
margin: 0;
padding: 0 0 0 40px;
list-style-type: none;
}
.nestable-rtl .nestable-list {
padding: 0 40px 0 0;
}
.nestable>.nestable-list {
padding: 0;
}
.nestable-item,
.nestable-item-copy {
margin: 10px 0 0;
}
.nestable-item:first-child,
.nestable-item-copy:first-child {
margin-top: 0;
}
.nestable-item .nestable-list,
.nestable-item-copy .nestable-list {
margin-top: 10px;
}
.nestable-item {
position: relative;
}
.nestable-item.is-dragging .nestable-list {
pointer-events: none;
}
.nestable-item.is-dragging * {
opacity: 0;
filter: alpha(opacity=0);
}
.nestable-item.is-dragging:before {
content: ' ';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(106, 127, 233, 0.274);
border: 1px dashed rgb(73, 100, 241);
-webkit-border-radius: 5px;
border-radius: 5px;
}
.nestable-drag-layer {
position: fixed;
top: 0;
left: 0;
z-index: 100;
pointer-events: none;
}
.nestable-rtl .nestable-drag-layer {
left: auto;
right: 0;
}
.nestable-drag-layer>.nestable-list {
position: absolute;
top: 0;
left: 0;
padding: 0;
background-color: rgba(106, 127, 233, 0.274);
}
.nestable-rtl .nestable-drag-layer>.nestable-list {
padding: 0;
}
.nestable [draggable="true"] {
cursor: move;
}
.nestable-handle {
display: inline;
}
.expandable .has-children ol {
display: none;
}
.expandable .has-children.is-active>ol {
display: block;
}