Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7bd9adb

Browse files
0.4.0 dropPlaceholder
1 parent 3158011 commit 7bd9adb

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default {
4646
items: generateItems(50, i => ({ id: i, data: "Draggable " + i }))
4747
};
4848
},
49-
methods: {
49+
methods: {
5050
onDrop(dropResult) {
5151
this.items = applyDrag(this.items, dropResult);
5252
}
@@ -67,7 +67,7 @@ Properties define the visual behaviour of the library:
6767
| Property | Type | Default | Description |
6868
| - | :-: | :-: | - |
6969
| :orientation | string | `vertical` | Orientation of the container. Can be **horizontal** or **vertical**. |
70-
| :behaviour | string | `move` | Property to describe weather the dragging item will be moved or copied to target container. Can be **move** or **copy**.
70+
| :behaviour | string | `move` | Property to describe weather the dragging item will be moved or copied to target container. Can be **move** or **copy** or **drop-zone** or **contain**.
7171
| :tag | string or NodeDescription | `div` | *See descriptions below*
7272
| :group-name | string | `undefined` | Draggables can be moved between the containers having the same group names. If not set container will not accept drags from outside. This behaviour can be overriden by shouldAcceptDrop function. See below.
7373
| :lock-axis | string | `undefined` | Locks the movement axis of the dragging. Possible values are **x**, **y** or **undefined**.
@@ -79,6 +79,7 @@ Properties define the visual behaviour of the library:
7979
| :drag-class | string | `undefined` | Class to be added to the ghost item being dragged. The class will be added after it's added to the DOM so any transition in the class will be applied as intended.
8080
| :drop-class | string | `undefined` | Class to be added to the ghost item just before the drop animation begins.
8181
|:remove-on-drop-out|boolean|`undefined`|When set true onDrop will be called with a removedIndex if you drop element out of any relevant container|
82+
|:drop-placeholder|boolean,object|`undefined`|Options for drop placeholder. **className**, **animationDuration**, **showOnTop**|
8283

8384

8485
### `tag`

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-smooth-dnd",
3-
"version": "0.3.2",
3+
"version": "0.4.0",
44
"description": "Vue wrappers for smooth-dnd",
55
"author": "Kutlu Sahin",
66
"homepage": "https://kutlugsahin.github.io/vue-smooth-dnd/",
@@ -45,7 +45,7 @@
4545
"url": "https://github.com/kutlugsahin/vue-smooth-dnd/issues"
4646
},
4747
"dependencies": {
48-
"smooth-dnd": "^0.8.6"
48+
"smooth-dnd": "^0.9.0"
4949
},
5050
"devDependencies": {
5151
"babel-jest": "^23.4.0",

‎src/Container.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const mapOptions = context => {
2424
if (props.lockAxis) options.lockAxis = props.lockAxis
2525
if (props.dragClass) options.dragClass = props.dragClass
2626
if (props.dropClass) options.dropClass = props.dropClass
27+
if (props.dropPlaceholder) options.dropPlaceholder = props.dropPlaceholder
2728
if (props.removeOnDropOut) options.removeOnDropOut = props.removeOnDropOut
2829
if (props['drag-start']) {
2930
options.onDragStart = params => {
@@ -114,6 +115,7 @@ export default {
114115
},
115116
getGhostParent: Function,
116117
'drop-ready': Function,
118+
dropPlaceholder: [Object, Boolean]
117119
},
118120
render: function (createElement) {
119121
const tagProps = getTagProps(this)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /