UNPKG

a-draggable-component

Version:

一个可以托拽的vue3+typescript组件,主要应用场景:两个子空间的拖拽状态的相互转换

112 lines (111 loc) 2.35 kB
body[data-v-b6f4cdc8] { position: relative; } div[data-v-b6f4cdc8] { user-select: none; transition: height 0.5s ease; } .main-container[data-v-b6f4cdc8] { /* z-index: 1000; */ position: absolute; top: 0; left: 0; background: transparent; } .square-content[data-v-b6f4cdc8] { position: absolute; top: 0px; left: 0px; width: inherit; background: red; display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between; } .square-bottom[data-v-b6f4cdc8] { width: inherit; box-sizing: border-box; display: flex; align-items: center; position: absolute; bottom: 0px; left: 0px; } .margin-label-container[data-v-c1ddda83] { width: 200px; height: 200px; position: absolute; top: 0px; left: 0px; cursor: grab; } .margin-label-container .top[data-v-c1ddda83] { position: absolute; top: 0px; } .margin-label-container .top svg[data-v-c1ddda83] { display: none; transform: rotate(-90deg); } .margin-label-container .top:hover svg[data-v-c1ddda83] { display: block; } .margin-label-container .left[data-v-c1ddda83] { position: absolute; left: 0px; } .margin-label-container .left svg[data-v-c1ddda83] { display: none; transform: rotate(180deg); } .margin-label-container .left:hover svg[data-v-c1ddda83] { display: block; } .margin-label-container .bottom[data-v-c1ddda83] { position: absolute; bottom: 0px; } .margin-label-container .bottom svg[data-v-c1ddda83] { display: none; transform: rotate(90deg); } .margin-label-container .bottom:hover svg[data-v-c1ddda83] { display: block; } .margin-label-container .right[data-v-c1ddda83] { position: absolute; right: 0px; } .margin-label-container .right svg[data-v-c1ddda83] { display: none; transform: rotate(0deg); } .margin-label-container .right:hover svg[data-v-c1ddda83] { display: block; } .separator[data-v-c1ddda83] { font-size: 12px; display: flex; align-items: center; justify-content: center; } .separator[data-v-c1ddda83]:hover { background-color: #f7f8f9; } .separator-vertical[data-v-c1ddda83] { cursor: col-resize; width: 12px; height: 100%; } .separator-horizontal[data-v-c1ddda83] { cursor: row-resize; width: 100%; height: 12px; } .separator-nesw[data-v-c1ddda83] { cursor: nesw-resize; } .separator-nwse[data-v-c1ddda83] { cursor: nwse-resize; }