yann-drag-resize
v1.1.0
Published
vue3拖拽缩放并具有自动吸附对齐、参考线等功能
Downloads
5
Readme
yann-drag-resize
安装
$ npm install yann-drag-resize
使用
import DragResize from 'yann-drag-resize';
import 'yann-drag-resize/dist/style.css';
<template>
<div id="app">
<div class="parent">
<DragResize
:initW="20"
:initH="20"
v-model:x="x"
v-model:y="y"
v-model:w="w"
v-model:h="h"
v-model:active="active"
:draggable="true"
:resizable="true"
:parent-scale-x="1"
:parent-scale-y="1"
@activated="activated('activated')"
@deactivated="deactivated('deactivated')"
@drag-start="dragStart('drag-start')"
@resize-start="resizeStart('resize-start')"
@dragging="dragging('dragging')"
@resizing="resizing('resizing')"
@drag-end="dragEnd('drag-end')"
@resize-end="resizeEnd('resize-end')"
>
test
</DragResize>
</div>
</div>
</template>