Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to resolve directive: dragula - 2.2.4 #38

Open
btmdave opened this issue Mar 16, 2017 · 2 comments
Open

Failed to resolve directive: dragula - 2.2.4 #38

btmdave opened this issue Mar 16, 2017 · 2 comments

Comments

@btmdave
Copy link

btmdave commented Mar 16, 2017

Just tested a basic setup with vue 2.2.4 and webpack and gives me failed to resolve directive. Is this supported in 2.2.4 or am I missing something? Thanks

<template>
  <div>
    <div class="wrapper">
      <div class="container" v-dragula="colOne" bag="first-bag">
        <div v-for="text in colOne" :key="text">{{text}}</div>
      </div>
      <div class="container" v-dragula="colTwo" bag="first-bag">
        <div v-for="text in colTwo" :key="text">{{text}}</div>
      </div>
    </div>
  </div>
</template>

<script>

import Vue from 'Vue'
import VueDragula from 'vue-dragula'

Vue.use(VueDragula)

export default {
  name: 'index',
  data: () => {
    return {
      colOne: [
        'You can move these elements between these two containers',
        'Moving them anywhere else isn"t quite possible',
        'There"s also the possibility of moving elements around in the same container, changing their position'
      ],
      colTwo: [
        'This is the default use case. You only need to specify the containers you want to use',
        'More interactive use cases lie ahead',
        'Another message'
      ],
      categories: [
        [1, 2, 3],
        [4, 5, 6]
      ],
      copyOne: [
        'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.',
        'Aenean commodo ligula eget dolor. Aenean massa.'
      ],
      copyTwo: [
        'Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',
        'Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.'
      ]
    }
  },
  created: function () {
    Vue.vueDragula.options('third-bag', {
      copy: true
    })
  },
  ready: function () {
    var _this = this
    Vue.vueDragula.eventBus.$on(
      'drop',
      function (args) {
        console.log('drop: ' + args[0])
        console.log(_this.categories)
      }
    )
    Vue.vueDragula.eventBus.$on(
      'dropModel',
      function (args) {
        console.log('dropModel: ' + args)
        console.log(_this.categories)
      }
    )
  }
}
</script>
@Astray-git
Copy link
Owner

It's not ready for vue 2.2 yet.

@vikingvynotking
Copy link

How about now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants