Skip to content

Commit beb232c

Browse files
Update README.md
1 parent 2c9eaa7 commit beb232c

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Based on and offering all features of [Sortable.js](https://github.com/RubaXa/So
2929
Use draggable component:
3030

3131
``` html
32-
<draggable :list="list" :option="{group:'people'}" @start="dragging=true" @end="dragging=false">
32+
<draggable :list="list" :options="{group:'people'}" @start="dragging=true" @end="dragging=false">
3333
<div v-for="element in list">{{element.name}}</div>
3434
</draggable>
3535
```
@@ -44,7 +44,7 @@ Array to be synchronized with drag-and-drop. Typically same array as refrenced b
4444

4545
Note that draggabe component can be used with a list prop
4646

47-
#### option
47+
#### options
4848
Type: `Object`<br>
4949
Required: `true`
5050

@@ -59,10 +59,13 @@ Called when there equivalent onStart, onAdd, .... are fired by Sortabe.js with t
5959

6060
[See here for reference](https://github.com/RubaXa/Sortable#event-object-demo)
6161

62+
###Fiddle
63+
Simple:
64+
https://jsfiddle.net/dede89/sqssmhtz/
6265

63-
##For Vue.js 1.0
66+
Two Lists:
6467

65-
##Usage
68+
##For Vue.js 1.0
6669

6770
Use it exactly as v-for directive, passing optional parameters using 'options' parameter.
6871
Option parameter can be json string or a full javascript object.
@@ -73,7 +76,7 @@ Option parameter can be json string or a full javascript object.
7376
</div>
7477
```
7578

76-
##Limitation
79+
###Limitation
7780

7881
* This directive works only when applied to arrays and not to objects.
7982
* `onStart`, `onUpdate`, `onAdd`, `onRemove` Sortable.js options hooks are used by v-dragable-for to update VM. As such these four options are not usable with v-dragable-for. If you need to listen to re-order events, you can watch the underlying view model collection. For example:
@@ -83,13 +86,7 @@ Option parameter can be json string or a full javascript object.
8386
console.log('Collection updated!');
8487
},
8588
```
86-
##fiddle
87-
88-
#Vue.js 2.0
89-
Simple:
90-
https://jsfiddle.net/dede89/sqssmhtz/
91-
92-
#Vue.js 1.0
89+
###fiddle
9390
Simple:
9491
https://jsfiddle.net/dede89/j62g58z7/
9592

0 commit comments

Comments
 (0)