File tree Expand file tree Collapse file tree 4 files changed +224
-369
lines changed Expand file tree Collapse file tree 4 files changed +224
-369
lines changed Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html class ="no-js " lang ="">
3
+
4
+ < head >
5
+ < meta charset ="utf-8 ">
6
+ < meta http-equiv ="x-ua-compatible " content ="ie=edge ">
7
+ < title > Example ul element</ title >
8
+ < meta name ="description " content ="">
9
+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
10
+
11
+ < link rel ="stylesheet " href ="css/main.css ">
12
+ </ head >
13
+
14
+ < body >
15
+
16
+ < div id ="main ">
17
+ < div class ="container-fluid machine-contents ">
18
+ < draggable :list ="jobs " :options ="{animation:150} " :no-default-animation-on-drag ="true " @start ="drag=true " @end ="drag=false ">
19
+ < transition-group :name ="!drag? 'list-complete' : null " :class ="{'no' : drag} " :css ="true ">
20
+ < div v-for ="(job, index) in jobs " :key ="job.jobNumber " :class ="drag? 'item' : 'list-complete-item' ">
21
+ < div >
22
+ {{ job.jobNumber }}
23
+ </ div >
24
+ < div >
25
+ < br >
26
+ < button v-on:click ="removeJob(index) "> Remove</ button >
27
+ </ div >
28
+ </ div >
29
+ </ transition-group >
30
+ </ draggable >
31
+ </ div >
32
+ < button v-on:click ="add "> Add</ button >
33
+ </ div >
34
+ < script type ="text/javascript " src ="libs\vue\dist\vue.js "> </ script >
35
+ < script type ="text/javascript " src ="libs\Sortable\Sortable.js "> </ script >
36
+ < script type ="text/javascript " src ="src\vuedraggable.js "> </ script >
37
+ < script type ="text/javascript " src ="script\transition2.js "> </ script >
38
+ </ body >
39
+
40
+ </ html >
Original file line number Diff line number Diff line change 38
38
border : solid 1px ;
39
39
transition : all 1s ;
40
40
height : 60px ;
41
+ overflow : hidden;
41
42
}
42
43
44
+ .item {
45
+ padding : 4px ;
46
+ margin-top : 4px ;
47
+ border : solid 1px ;
48
+ height : 60px ;
49
+ }
50
+
51
+ /*.list-complete-item.no {
52
+ transition: none !important;
53
+ }*/
54
+
55
+
43
56
.list-complete-enter , .list-complete-leave-active {
44
57
opacity : 0 ;
45
58
height : 0px ;
46
59
margin-top : 0px ;
47
60
padding : 0px ;
48
61
border : solid 0px ;
49
62
}
63
+
64
+ .machine-contents {
65
+ margin-top : 10px ;
66
+ margin-bottom : 10px ;
67
+ }
You can’t perform that action at this time.
0 commit comments