1.安装
npm install @gausszhou/vue-drag-resize-rotate
2.使用
<template>
<div class="container">
<vue-drag-resize-rotate
:w="200"
:h="200"
: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>