vuedraggable
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -74,2 +74,6 @@ 'use strict'; | ||
} | ||
}, | ||
element: { | ||
type: String, | ||
default: 'div' | ||
} | ||
@@ -82,3 +86,3 @@ }; | ||
render: function render(h) { | ||
return h('div', null, this.$slots.default); | ||
return h(this.element, null, this.$slots.default); | ||
}, | ||
@@ -174,3 +178,3 @@ mounted: function mounted() { | ||
if (typeof exports == "object") { | ||
if (typeof exports == "object") { | ||
var Sortable = require("sortablejs"); | ||
@@ -177,0 +181,0 @@ module.exports = buildDraggable(Sortable); |
{ | ||
"name": "vuedraggable", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "draggable component for vue", | ||
@@ -5,0 +5,0 @@ "main": "dist/vuedraggable.js", |
@@ -48,3 +48,3 @@ # Vue.Draggable | ||
Type: `Object`<br> | ||
Required: `true` | ||
Required: `false` | ||
@@ -54,3 +54,17 @@ Option used to inicialize the sortable object see: [sortable option documentation](https://github.com/RubaXa/Sortable#options)<br> | ||
#### Events | ||
#### element | ||
Type: `String`<br> | ||
Default: `'div'` | ||
HTML root element that draggable component create as outer element for the included slot. | ||
#### clone | ||
Type: `Function`<br> | ||
Required: `false`<br> | ||
Default: `(original) => { return original;}`<br> | ||
Function called on the source component to clone element when clone option is true. The unique argument is the viewModel element to be cloned and the returned value should be its cloned version.<br> | ||
By default vue.draggable reuse the viewmodel element, so you have to use this hook if you want to clone or deep clone it. | ||
### Events | ||
`start`, `add`, `remove`, `update`, `end`, `choose`, `sort`, `filter`, `move`, `clone`<br> | ||
@@ -57,0 +71,0 @@ Called when there equivalent onStart, onAdd, .... are fired by Sortabe.js with the same argument.<br> |
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
13248
164
157