Skip to content

Commit ed2147f

Browse files
author
pc-david\david.desmaisons
committed
2 parents fb8260e + e8df8dc commit ed2147f

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 David Desmaisons
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,60 @@
22
Vue directive for lists allowing drag-and-drop sorting in sync with View-Model. Based on [Sortable.js](https://github.com/RubaXa/Sortable)
33

44

5-
#Example
5+
##Motivation
6+
7+
Create a directive that displays a dragable list and keeps in sync the view and underlying view model.
8+
9+
##Demo
10+
11+
Simple:
612

713
https://jsfiddle.net/dede89/j62g58z7/
14+
15+
Two Lists:
16+
17+
https://jsfiddle.net/dede89/hqxranrd/
18+
19+
##Feature
20+
21+
* Full support of [Sortable.js](https://github.com/RubaXa/Sortable) options via options parameters
22+
* Keeps in sync view model and view
23+
* No jquery dependency
24+
25+
##Usage
26+
27+
Use it exactly as v-for directive, passing optional parameters using 'options' parameter.
28+
29+
``` html
30+
<template v-dragable-for="element in list1" options='{"group":"people"}'>
31+
<p>{{element.name}}</p>
32+
</template>
33+
```
34+
## Installation
35+
- Available through:
36+
``` js
37+
npm install vuedragablefor
38+
```
39+
``` js
40+
Bower install vue.dragable.for
41+
```
42+
- #### For Modules
43+
44+
``` js
45+
// ES6
46+
import Vue from 'vue'
47+
import VueDragableFor from 'vuedragablefor'
48+
Vue.use(VueDragableFor)
49+
50+
// ES5
51+
var Vue = require('vue')
52+
Vue.use(require('vuedragablefor'))
53+
```
54+
55+
- #### For `<script>` Include
56+
57+
Just include `vue.dragable.for.js` after Vue itself.
58+
59+
## License
60+
61+
[MIT](https://github.com/David-Desmaisons/Vue.Dragable.For/blob/master/LICENSE)

0 commit comments

Comments
 (0)