一个Vue2.0组件,支持拖拽,拉伸,旋转,放缩,自动对齐;A Component for Vue.js 2.0;
简体中文 | English
Please detour if the elements dragged at the same time reach more than 50+ businesses
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>
Tip: After turning on the rotation, the grid alignment and parent container restrictions will be invalid, and there will be Breaking Changes to be refactored! ! !
https://github.com/mauricius/vue-draggable-resizable
https://github.com/gorkys/vue-draggable-resizable-gorkys
https://github.com/tmrcui/vue-draggable-resizable-rotatable