一个Vue3.0组件,支持拖拽,拉伸,旋转,放缩,自动对齐;A Component for Vue.js 3.0;
npm install @gausszhou/vue3-drag-resize-rotate
import { createApp } from "vue";
import VueDragResizeRotate from "@gausszhou/vue3-drag-resize-rotate";
import "@gausszhou/vue3-drag-resize-rotate/lib/bundle.esm.css";
const app = createApp(App);
// use
app.use(VueDragResizeRotate);
// or component
// app.component(VueDragResizeRotate.name, VueDragResizeRotate);
app.mount("#app");
Prop | Description |
---|---|
draggable | Enable drag |
resizable | Enable resize |
rotatable | Enable rotate |
w | width |
h | height |
x | left |
y | top |
z | Zindex |
r | rotate angle |
Event | Description |
---|---|
dragging | on dragging |
dragstop | on drag stop |
resizing | on resizing |
resizestop | on resize stop |
rotating | on rotating |
rotatestop | on rotate stop |
activated | on activeed |
deactivated | on deactiveed |
refLineParams | on reference line change |
https://github.com/gausszhou/vue-drag-resize-rotate
感谢 gogocode
提供的代码转换服务