提交 500c3374 编写于 作者: O owen-m1

Better plugin docs

上级 79941353
......@@ -15,13 +15,13 @@ Supported by [<img width="100px" src="https://user-images.githubusercontent.com/
* Smart auto-scrolling
* Advanced swap detection
* Smooth animations
* [Multi-drag](https://github.com/SortableJS/Sortable/wiki/Dragging-Multiple-Items-in-Sortable) support
* [Multi-drag](https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag) support
* Built using native HTML5 drag and drop API
* Supports
* [Meteor](https://github.com/SortableJS/meteor-sortablejs)
* Angular
* [2.0+](https://github.com/SortableJS/angular-sortablejs)
* [1.*](https://github.com/SortableJS/angular-legacy-sortablejs)
* [1.&ast;](https://github.com/SortableJS/angular-legacy-sortablejs)
* React
* [ES2015+](https://github.com/SortableJS/react-sortablejs)
* [Mixin](https://github.com/SortableJS/react-mixin-sortablejs)
......@@ -31,6 +31,7 @@ Supported by [<img width="100px" src="https://user-images.githubusercontent.com/
* [Ember](https://github.com/SortableJS/ember-sortablejs)
* Supports any CSS library, e.g. [Bootstrap](#bs)
* Simple API
* Support for [plugins](#plugins)
* [CDN](#cdn)
* No jQuery required (but there is [support](https://github.com/SortableJS/jquery-sortablejs))
......@@ -719,6 +720,19 @@ Mounts a plugin to Sortable.
---
### Plugins
#### Extra Plugins (included in complete versions)
- [MultiDrag](https://github.com/SortableJS/Sortable/tree/master/plugins/MultiDrag)
- [Swap](https://github.com/SortableJS/Sortable/tree/master/plugins/Swap)
#### Default Plugins (included in default versions)
- [AutoScroll](https://github.com/SortableJS/Sortable/tree/master/plugins/AutoScroll)
- [OnSpill](https://github.com/SortableJS/Sortable/tree/master/plugins/OnSpill)
---
<a name="cdn"></a>
### CDN
......
......@@ -10,6 +10,17 @@ Demo:
---
### Mounting
```js
import { Sortable, AutoScroll } from 'sortablejs';
Sortable.mount(new AutoScroll());
```
---
### Options
```js
......
......@@ -9,6 +9,17 @@ Demo: https://jsbin.com/wopavom/edit?js,output
---
### Mounting
```js
import { Sortable, MultiDrag } from 'sortablejs';
Sortable.mount(new MultiDrag());
```
---
### Options
```js
......
......@@ -6,6 +6,17 @@ This file contains two seperate plugins, RemoveOnSpill and RevertOnSpill. They c
---
### Mounting
```js
import { Sortable, OnSpill } from 'sortablejs';
Sortable.mount(OnSpill);
```
---
## RevertOnSpill Plugin
This plugin, when enabled, will cause the dragged item to be reverted to it's original position if it is spilled (ie. it is dropped outside of a valid Sortable drop target)
......
......@@ -7,6 +7,17 @@ Demo: https://jsbin.com/yejehog/edit?html,js,output
---
### Mounting
```js
import { Sortable, Swap } from 'sortablejs';
Sortable.mount(new Swap());
```
---
### Options
```js
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册