The only required dependencies are:
- Vue.js (required ^v2.x.x, test with v2.0.3).
$ npm install git://github.com/shaoxiong789/vue-drag.git --save
<template>
<div>
<dragboot :list="lists" indicate="name">
<template scope="props">
<div :style="{background:props.item.color}">
{{props.item.name}}
</div>
</template>
</dragboot>
</div>
</template>
<script>
import {dragboot} from 'vue-drag'
export default {
components:{dragboot},
data() {
return {
lists:[
{name:'1',color:'red'},
{name:'2',color:'orange'},
{name:'3',color:'yellow'},
{name:'4',color:'green'},
{name:'5',color:'indigo'},
{name:'6',color:'blue'},
{name:'7',color:'purple'}
]
}
}
}
</script>