js-tools-for-vue
v0.1.3
Published
这是一个自用的工具库, 如果能帮到你, 那我很高兴
Downloads
5
Readme
js-tools-for-vue
安装
npm install js-tools-for-vue -S
使用
import Vue from 'vue'
import { moveDirective } from 'js-tools-for-vue'
Vue.use(moveDirective)
<div>
<div class="move-area" v-move:[moveOptions].all.fixed="true">
<div class="click-move">触发拖动区域</div>
整体被拖动区域
</div>
<div class="move-area" v-move.all="true">
整体被拖动区域
</div>
</div>
<script>
export default {
data () {
return {
moveOptions: {
move: 'move-area',
click: 'click-move'
}
}
}
}
</script>
工具库介绍
指令
鼠标拖动
import { moveDirective } from 'js-tools-for-vue'