You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-16Lines changed: 21 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,13 +37,6 @@ template:
37
37
</div>
38
38
```
39
39
40
-
**NOTE** Vuejs 2.x
41
-
42
-
To make sure a correct update for DOM element order, we must provide a `key` for `v-for` directive inside a dragula container. https://vuejs.org/v2/guide/list.html#key
43
-
With `v-for="item in list"`, we need `:key="item.id"` for object items, `:key="item"` for plain string.
44
-
45
-
46
-
47
40
## APIs
48
41
49
42
You can access them from `Vue.vueDragula`
@@ -63,12 +56,9 @@ new Vue({
63
56
})
64
57
```
65
58
66
-
### `find(name)`
67
-
68
-
Returns the `bag` for a `drake` instance. Contains the following properties:
59
+
### `getDrake(name)`
69
60
70
-
-`name` the name that identifies the bag
71
-
-`drake` the raw `drake` instance
61
+
Returns the `drake` instance according the given name of a bag.
72
62
73
63
## Events
74
64
For drake events, refer to: https://github.com/bevacqua/dragula#drakeon-events
@@ -77,7 +67,7 @@ For drake events, refer to: https://github.com/bevacqua/dragula#drakeon-events
77
67
```js
78
68
...
79
69
newVue({
80
-
ready:function () {
70
+
mounted:function () {
81
71
Vue.vueDragula.eventBus.$on('drop', function (args) {
82
72
console.log('drop: '+ args[0])
83
73
})
@@ -88,9 +78,24 @@ new Vue({
88
78
89
79
## Special Events for vue-dragula
90
80
91
-
| Event Name | Listener Arguments | Event Description |
81
+
| Event Name | Listener Arguments |
92
82
| :-------------: |:-------------:| -----|
93
-
| dropModel | bagName, el, target, source, dropIndex | model was synced, dropIndex exposed |
94
-
| removeModel | bagName, el, container, removeIndex | model was synced, removeIndex exposed |
83
+
| drop-model | bagName, el, dropTarget, dropSource, dropIndex |
84
+
| remove-model | bagName, el, dropTarget, dropSource, dropIndex |
0 commit comments