How to use the dragula/dragula function in dragula

To help you get started, we’ve selected a few dragula examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github odranoelBR / vue-quasar-admin-example / src / components / views / dragAndDrop / exampleTwo / cardExampleTwo.vue View on Github external
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 () {
github odranoelBR / vue-quasar-admin-example / src / components / views / dragAndDrop / exempleOne / cardExampleOne.vue View on Github external
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: {

dragula

Drag and drop so simple it hurts

MIT
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis