简体中文 | English
同时拖动的元素达到50+以上业务的请绕道
npm install @gausszhou/vue-drag-resize-rotate
<template>
<div class="container">
<vue-drag-resize-rotate
:w="100"
:h="100"
:x="0"
:y="0"
:parent="true"
:draggable="true"
:resizable="true"
:rotatable="true"
@resizing="resizing"
@rotating="rotating"
:r="0"
>
{{angle}}
</vue-drag-resize-rotate>
</div>
</template>
<script>
import VueDragResizeRotate from "@gausszhou/vue-drag-resize-rotate";
export default {
components: {
VueDragResizeRotate,
},
data() {
return {
angle: 0,
};
},
methods: {
resizing(x, y, w, h) {
console.log(x, y, w, h);
},
rotating(angle) {
console.log(angle)
},
},
};
</script>
提示: 开启旋转后 网格对齐和父容器限制将失效,待重构代码,会有 Breaking Change!!!
https://github.com/mauricius/vue-draggable-resizable
https://github.com/gorkys/vue-draggable-resizable-gorkys
https://github.com/tmrcui/vue-draggable-resizable-rotatable