Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted () {
let containers = [
this.$refs.todoColumn.$refs.todo,
this.$refs.doingColumn.$refs.doing,
this.$refs.doneColumn.$refs.done
]
this.dragula = Dragula(containers, {
moves: function (el, container, handle) {
return handle.classList.contains('handle')
}
})
},
data () {
mounted () {
let vm = this
this.dragula = Dragula([document.querySelector('#left'), document.querySelector('#right')])
.on('drop', (el, container, source) => {
if (source.id === container.id) {
return
}
source.id === 'left'
? vm.totalCost += parseInt(el.value)
: vm.totalCost -= parseInt(el.value)
})
},
watch: {