# vue3-resize-drag
**Repository Path**: ocean-name/vue3-resize-drag
## Basic Information
- **Project Name**: vue3-resize-drag
- **Description**: vue3-resize-drag是vue3.0的拖拽缩放插件, 目前支持组件拖拽、缩放、旋转、拖拽辅助线、激活和取消激活、复制粘贴、键盘移动
- **Primary Language**: TypeScript
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 6
- **Created**: 2025-01-10
- **Last Updated**: 2025-01-10
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# vue3-resize-drag
# 文档
### vue3.0拖拽缩放插件
## 下载并引入
```
npm i vue3-resize-drag -S
yarn add vue3-resize-drag -S
import vue3ResizeDrag from 'vue3-resize-drag'
const app = createApp(App)
app.use(vue3ResizeDrag)
注意:
如果vue3.0中使用ts了,那么请在src/shims-vue.d.ts声明文件中加入此插件声明:
declare module 'vue3-resize-drag'
加入之后重启项目~~
```
## 组件用法
```
    
        :y="item.y"   
        :w="100"  
        :h="100"  
        :zIndex="1"  
        @moveHandler="moveHandler"  
        @mouseUpHandler="mouseUpHandler"  
        @downHandler="downHandler"  
        :isDraggable="item.drag"  
        :isResizable="item.resize"  
        :isRotate="item.rotate"   
        :isActive="item.active"  
        :rotate="0"  
        @resizeHandler="resizeHandler"  
        @rotateHandler="rotateHandler"  
        :resizeIconSize="8"  
        :isGuide="true"   
        :guideStyle="{}"  
        @activated="activated"  
        @deactivated="deactivated"  
        @mousedown="activeMouseDown(item,index)"   
        >
        {{item.name}}
    
```
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).