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

How to use it in vue-cil #29

Open
ljylhm opened this issue Nov 7, 2017 · 7 comments
Open

How to use it in vue-cil #29

ljylhm opened this issue Nov 7, 2017 · 7 comments

Comments

@ljylhm
Copy link

ljylhm commented Nov 7, 2017

I don't know how to use it in vue-cil , it dosen't work and throw a error 'Error in directive sortable bind hook: "Sortable: el must be HTMLElement, and not [object Undefined]"'

@lasthrun
Copy link

lasthrun commented Dec 5, 2017

the same problem...

@mgohin
Copy link

mgohin commented Dec 12, 2017

+1

2 similar comments
@glittle
Copy link

glittle commented Jan 21, 2018

+1

@LiamKlyneker
Copy link

+1

@eladcandroid
Copy link

Can anyone handle this?

@lasthrun
Copy link

lasthrun commented Mar 5, 2018

<script>
import Sortable from 'sortablejs'
import Vue from 'vue'

Vue.directive('sortable', {
  inserted: function (el, binding) {
    new Sortable(el, binding.value || {})
  }
})

export default {
//your vue component
}
</script>

@eladcandroid
@LiamKlyneker
@glittle
@mgohin

@eladcandroid
Copy link

Here's a more clean solution:
https://github.com/SortableJS/Vue.Draggable

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

6 participants