File tree Expand file tree Collapse file tree 4 files changed +51
-67
lines changed Expand file tree Collapse file tree 4 files changed +51
-67
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" app" >
3
- <img
4
- alt =" Vue logo"
5
- src =" ./assets/logo.png"
6
- />
3
+ <img alt =" Vue logo" src =" ./assets/logo.png" />
7
4
<div class =" container " >
8
- <ul
9
- class =" nav nav-tabs"
10
- role =" tablist"
11
- >
5
+ <ul class =" nav nav-tabs" role =" tablist" >
12
6
<li class =" nav-item" >
13
7
<a
14
8
class =" nav-link active"
17
11
role =" tab"
18
12
aria-controls =" profile"
19
13
aria-selected =" true"
20
- >Simple</a >
14
+ >Simple</a
15
+ >
21
16
</li >
22
17
23
18
<li class =" nav-item" >
28
23
role =" tab"
29
24
aria-controls =" profile"
30
25
aria-selected =" false"
31
- >Two Lists</a >
26
+ >Two Lists</a
27
+ >
32
28
</li >
33
29
34
30
<li class =" nav-item" >
39
35
role =" tab"
40
36
aria-controls =" profile"
41
37
aria-selected =" false"
42
- >Clone</a >
38
+ >Clone</a
39
+ >
43
40
</li >
44
41
45
42
<li class =" nav-item" >
50
47
role =" tab"
51
48
aria-controls =" profile"
52
49
aria-selected =" false"
53
- >Handler</a >
50
+ >Handler</a
51
+ >
54
52
</li >
55
53
56
54
<li class =" nav-item" >
61
59
role =" tab"
62
60
aria-controls =" profile"
63
61
aria-selected =" false"
64
- >Transition</a >
62
+ >Transition</a
63
+ >
65
64
</li >
66
65
67
66
<li class =" nav-item" >
72
71
role =" tab"
73
72
aria-controls =" profile"
74
73
aria-selected =" false"
75
- >Transitions</a >
74
+ >Transitions</a
75
+ >
76
76
</li >
77
77
78
78
<li class =" nav-item" >
83
83
role =" tab"
84
84
aria-controls =" profile"
85
85
aria-selected =" false"
86
- >Footer slot</a >
86
+ >Footer slot</a
87
+ >
87
88
</li >
88
89
89
90
<li class =" nav-item" >
94
95
role =" tab"
95
96
aria-controls =" profile"
96
97
aria-selected =" false"
97
- >Header slot</a >
98
+ >Header slot</a
99
+ >
98
100
</li >
99
-
100
101
</ul >
101
102
102
- <div
103
- class =" tab-content"
104
- id =" tab-content"
105
- >
103
+ <div class =" tab-content" id =" tab-content" >
106
104
<div
107
105
class =" tab-pane show active"
108
106
id =" simple"
166
164
<transition-example />
167
165
</div >
168
166
169
- <div
167
+ <div
170
168
class =" tab-pane show"
171
169
id =" transitions"
172
170
role =" tabpanel"
@@ -189,7 +187,6 @@ import handler from "./components/handler";
189
187
import transitionExample from " ./components/transition-example" ;
190
188
import transitionExample2 from " ./components/transition-example-2" ;
191
189
192
-
193
190
export default {
194
191
name: " app" ,
195
192
components: {
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" justify-content-center jumbotron" >
3
3
<div class =" row" >
4
-
5
4
<div class =" col-2" >
6
- <button
7
- class =" btn btn-secondary button"
8
- @click =" sort"
9
- >To original order</button >
5
+ <button class =" btn btn-secondary button" @click =" sort" >
6
+ To original order
7
+ </button >
10
8
</div >
11
9
12
10
<div class =" col-6" >
21
19
>
22
20
<transition-group
23
21
type =" transition"
24
- :name =" !drag? 'flip-list' : null"
22
+ :name =" !drag ? 'flip-list' : null"
25
23
>
26
24
<li
27
25
class =" list-group-item"
30
28
>
31
29
<i
32
30
:class ="
33
- element.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
34
- "
31
+ element.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
32
+ "
35
33
@click =" element.fixed = !element.fixed"
36
34
aria-hidden =" true"
37
35
></i >
41
39
</draggable >
42
40
</div >
43
41
44
- <rawDisplayer
45
- class =" col-3"
46
- :value =" list"
47
- title =" List"
48
- />
49
-
42
+ <rawDisplayer class =" col-3" :value =" list" title =" List" />
50
43
</div >
51
44
</div >
52
-
53
45
</template >
54
46
55
47
<script >
@@ -81,9 +73,9 @@ export default {
81
73
drag: false
82
74
};
83
75
},
84
- methods: {
85
- sort (){
86
- this .list = this .list .sort ((a ,b ) => a .order - b .order );
76
+ methods: {
77
+ sort () {
78
+ this .list = this .list .sort ((a , b ) => a .order - b .order );
87
79
}
88
80
},
89
81
computed: {
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" justify-content-center jumbotron" >
3
3
<div class =" row" >
4
-
5
4
<div class =" col-2" >
6
- <button
7
- class =" btn btn-secondary button"
8
- @click =" sort"
9
- >To original order</button >
5
+ <button class =" btn btn-secondary button" @click =" sort" >
6
+ To original order
7
+ </button >
10
8
</div >
11
9
12
10
<div class =" col-6" >
19
17
@start =" isDragging = true"
20
18
@end =" isDragging = false"
21
19
>
22
- <transition-group
23
- type =" transition"
24
- :name =" 'flip-list'"
25
- >
20
+ <transition-group type =" transition" :name =" 'flip-list'" >
26
21
<li
27
22
class =" list-group-item"
28
23
v-for =" element in list"
29
24
:key =" element.order"
30
25
>
31
26
<i
32
27
:class ="
33
- element.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
34
- "
28
+ element.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
29
+ "
35
30
@click =" element.fixed = !element.fixed"
36
31
aria-hidden =" true"
37
32
></i >
41
36
</draggable >
42
37
</div >
43
38
44
- <rawDisplayer
45
- class =" col-3"
46
- :value =" list"
47
- title =" List"
48
- />
49
-
39
+ <rawDisplayer class =" col-3" :value =" list" title =" List" />
50
40
</div >
51
41
</div >
52
-
53
42
</template >
54
43
55
44
<script >
@@ -80,9 +69,9 @@ export default {
80
69
})
81
70
};
82
71
},
83
- methods: {
84
- sort (){
85
- this .list = this .list .sort ((a ,b ) => a .order - b .order );
72
+ methods: {
73
+ sort () {
74
+ this .list = this .list .sort ((a , b ) => a .order - b .order );
86
75
}
87
76
},
88
77
computed: {
Original file line number Diff line number Diff line change 11
11
"prepublishOnly" : " npm run lint && npm run build" ,
12
12
"test:unit" : " vue-cli-service test:unit"
13
13
},
14
+ "keywords" : [
15
+ " vue" ,
16
+ " vuejs" ,
17
+ " drag" ,
18
+ " and" ,
19
+ " drop" ,
20
+ " list" ,
21
+ " Sortable.js" ,
22
+ " component"
23
+ ],
14
24
"dependencies" : {
15
25
"sortablejs" : " ^1.8.3" ,
16
26
"vue" : " ^2.5.22"
87
97
" dist/*.js" ,
88
98
" src/*"
89
99
],
90
- "keywords" : [
91
- " vue" ,
92
- " component"
93
- ],
94
100
"module" : " dist/vuedraggable.common.min.js"
95
- }
101
+ }
You can’t perform that action at this time.
0 commit comments