vuedraggable
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -91,3 +91,3 @@ 'use strict'; | ||
render: function render(h) { | ||
if (this.$slots.default.length === 1) { | ||
if (this.$slots.default && this.$slots.default.length === 1) { | ||
var child = this.$slots.default[0]; | ||
@@ -94,0 +94,0 @@ if (child.componentOptions && child.componentOptions.tag === "transition-group") { |
{ | ||
"name": "vuedraggable", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "draggable component for vue", | ||
@@ -5,0 +5,0 @@ "main": "dist/vuedraggable.js", |
@@ -26,2 +26,3 @@ # Vue.Draggable | ||
* No jquery dependency | ||
* Plays nicely with Vue.js 2.0 transition-group | ||
@@ -32,2 +33,3 @@ ##For Vue.js 2.0 | ||
Tipical use: | ||
``` html | ||
@@ -39,2 +41,15 @@ <draggable :list="list" :options="{group:'people'}" @start="dragging=true" @end="dragging=false"> | ||
With `transition-group`: | ||
``` html | ||
<draggable :list="list"> | ||
<transition-group> | ||
<div v-for="element in list" :key="element.id"> | ||
{{element.name}} | ||
</div> | ||
</transition-group> | ||
</draggable> | ||
``` | ||
Draggable component should directly wrap the draggable elements, or a `transition-component` containing the draggable elements. | ||
### Props | ||
@@ -85,2 +100,5 @@ #### list | ||
Example with transition-group: | ||
https://jsfiddle.net/dede89/m2v0orcn/ | ||
##For Vue.js 1.0 | ||
@@ -87,0 +105,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14265
175