js div推拽
<template>
<div>
<br/>
<div @drop="tt()" @dragover.prevent>
<div>
{{ test }}
</div>
</div>
<br/>
<div :draggable="true" @dragover.prevent @dragstart="drag" @click="btnClick">点击</div>
</div>
</template>
<script>
export default {
data() {
return {
test: ['yuan ']
};
},
methods: {
btnClick() {
}
,
drag(vm) {
console.log(vm);
},
tt() {
this.test.push('aaaa')
}
}
}
</script>
择善人而交,择善书而读,择善言而听,择善行而从。