# element-ui 增强指令

## Element UI 中 dialog 可拖拽
### 导入使用
```code[javascript]
import elementDrag from "niceloo-vue2element-ui/service/directives/element-drag";
```
### DEMO
:::demo
```html

<template>
    <div>
        <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>
        <el-dialog v-elementDrag title="提示" :visible.sync="dialogVisible">
            <span>这是一段信息</span>
        </el-dialog> 
        <div style="height:200px;width:200px;background-color: #00feff;"  
             v-element-drag="{dragSelector:'.drag', moveSelector:'.content'}"
             class="content">
                        <br>
            <div style="height:100px;width:100px;background-color:red" class="drag">
                drag
            </div>
        </div>
    </div>
</template>

<script>
export default {
    directives:{
        elementDrag
    },
    data() {
      return {
        dialogVisible: false
      };
    },
}
</script>
```
:::
