# Drag 拖拽
### 介绍
实现可拖拽的任意元素
### 安装
``` javascript
import { createApp } from 'vue';
import { Drag } from '@nutui/nutui';
const app = createApp();
app.use(Drag);
```
## 基本用法
```html
可点击,可拖拽
```
## 限制拖拽方向
```html
只能在X轴拖动
```
## 限制拖拽方向
```html
只能在Y轴拖动
```
## Prop
| 字段 | 说明 | 类型 | 默认值 |
| :-------- | :------------------------------------------------ | :------------- | :---------------------------------- |
| direction | 拖拽元素的拖拽方向限制,**x**/**y**/**all**三选一 | String | 'all' |