We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1a4fda commit 4957b67Copy full SHA for 4957b67
src/components/nested.vue
@@ -1,6 +1,6 @@
1
<template>
2
<draggable class="dragArea" tag="ul" :list="data" @start="onStartDrag" @choose="onClick" :group="{ name: 'g1' }"
3
- :item-key="getItemKey" @end="onEndDrag">
+ v-bind="dragOptions" :item-key="getItemKey" @end="onEndDrag">
4
<template #item="{ element }">
5
<li class="itemArea">
6
<p>{{ getRawComponentKey(element) }}</p>
@@ -28,6 +28,14 @@ export default {
28
},
29
30
computed: {
31
+ dragOptions() {
32
+ return {
33
+ animation: 200,
34
+ group: "description",
35
+ disabled: false,
36
+ ghostClass: "ghost"
37
+ };
38
+ }
39
40
methods: {
41
getItemKey(item) {
@@ -80,6 +88,11 @@ export default {
80
88
padding-bottom: 2px;
81
89
}
82
90
91
+.ghost {
92
+ opacity: 0.5;
93
+ background: #c8ebfb;
94
+}
95
+
83
96
p {
84
97
margin: 10px 0;
85
98
0 commit comments