1.1.0 • Published 1 year ago
simple-vue-drag-directive v1.1.0
How to install ?
npm install simple-vue-drag-directive
How to use ?
After installing the package, you can import as ES Module:
<script setup>
import { vDrag } from 'simple-vue-drag-directive'
</script>
<template>
<your-component v-drag={}></your-component>
</template>
And now you can drag <your-compnonet></your-compnonet>
everywhere!
All right, if you want more function, you can also give v-drag
some value. Just like the following.
<template>
<your-component v-drag="{limit: 0.5, draggingClassList:['draging']}"></your-component>
</template>
.draging {
opacity: 0.5;
}
About the project dictionary
the directive code is in the ./src/directive
How to start ther demo ?
npm run dev
If you have any good ideas, welcome to fork the project.
My email address is 1446909703@qq.com.