File tree Expand file tree Collapse file tree 7 files changed +40
-96
lines changed Expand file tree Collapse file tree 7 files changed +40
-96
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
-
9
- <ul
10
- class =" nav nav-tabs"
11
- role =" tablist"
12
- >
5
+ <ul class =" nav nav-tabs" role =" tablist" >
13
6
<li class =" nav-item" >
14
7
<a
15
8
class =" nav-link active"
18
11
role =" tab"
19
12
aria-controls =" profile"
20
13
aria-selected =" true"
21
- >Simple</a >
14
+ >Simple</a
15
+ >
22
16
</li >
23
17
24
- <li class =" nav-item" >
18
+ <li class =" nav-item" >
25
19
<a
26
20
class =" nav-link"
27
21
data-toggle =" tab"
28
22
href =" #twoLists"
29
23
role =" tab"
30
24
aria-controls =" profile"
31
25
aria-selected =" false"
32
- >Two Lists</a >
26
+ >Two Lists</a
27
+ >
33
28
</li >
34
29
35
- <li class =" nav-item" >
30
+ <li class =" nav-item" >
36
31
<a
37
32
class =" nav-link"
38
33
data-toggle =" tab"
39
34
href =" #clone"
40
35
role =" tab"
41
36
aria-controls =" profile"
42
37
aria-selected =" false"
43
- >Clone</a >
38
+ >Clone</a
39
+ >
44
40
</li >
45
-
46
41
</ul >
47
- <div
48
- class =" tab-content"
49
- id =" tab-content"
50
- >
51
-
42
+ <div class =" tab-content" id =" tab-content" >
52
43
<div
53
44
class =" tab-pane show active"
54
45
id =" simple"
55
46
role =" tabpanel"
56
47
aria-labelledby =" profile-tab"
57
48
>
58
49
<simple />
59
-
60
50
</div >
61
51
62
- <div
52
+ <div
63
53
class =" tab-pane show"
64
54
id =" twoLists"
65
55
role =" tabpanel"
66
56
aria-labelledby =" profile-tab"
67
57
>
68
58
<twoLists />
69
-
70
59
</div >
71
60
72
61
<div
76
65
aria-labelledby =" profile-tab"
77
66
>
78
67
<clone />
79
-
80
68
</div >
81
-
82
-
83
69
</div >
84
70
</div >
85
71
</div >
Original file line number Diff line number Diff line change 1
1
<template >
2
-
3
2
<div class =" justify-content-center jumbotron" >
4
-
5
3
<div class =" row" >
6
4
<div class =" col-3" >
7
5
<h3 >Draggable for list 1</h3 >
8
6
<draggable
9
7
class =" dragArea list-group"
10
8
:list =" list1"
11
- :options =" {group:{ name:'people', pull:'clone', put:false }}"
9
+ :options =" { group: { name: 'people', pull: 'clone', put: false } }"
12
10
@change =" log"
13
11
>
14
12
<div
15
13
class =" list-group-item"
16
14
v-for =" (element, index) in list1"
17
15
:key =" element.name"
18
16
>
19
- {{element.name}} {{index}}
17
+ {{ element.name }} {{ index }}
20
18
</div >
21
19
</draggable >
22
20
</div >
26
24
<draggable
27
25
class =" dragArea list-group"
28
26
:list =" list2"
29
- :options =" {group:'people'}"
27
+ :options =" { group: 'people' }"
30
28
@change =" log"
31
29
>
32
30
<div
33
31
class =" list-group-item"
34
32
v-for =" (element, index) in list2"
35
33
:key =" element.name"
36
34
>
37
- {{element.name}} {{index}}
35
+ {{ element.name }} {{ index }}
38
36
</div >
39
37
</draggable >
40
38
</div >
41
39
42
- <rawDisplayer
43
- class =" col-3"
44
- :value =" list1"
45
- title =" List 1"
46
- />
47
-
48
- <rawDisplayer
49
- class =" col-3"
50
- :value =" list2"
51
- title =" List 2"
52
- />
40
+ <rawDisplayer class =" col-3" :value =" list1" title =" List 1" />
53
41
42
+ <rawDisplayer class =" col-3" :value =" list2" title =" List 2" />
54
43
</div >
55
-
56
44
</div >
57
45
</template >
58
46
59
47
<script >
60
48
import draggable from " @/components/Vuedraggable" ;
61
49
import rawDisplayer from " ./raw-displayer.vue" ;
62
- let id = 1 ;
63
50
export default {
64
51
name: " clone" ,
65
52
components: {
@@ -83,11 +70,9 @@ export default {
83
70
},
84
71
methods: {
85
72
log : function (evt ) {
86
- console .log (evt);
73
+ window . console .log (evt);
87
74
}
88
75
}
89
76
};
90
77
</script >
91
- <style scoped>
92
- </style >
93
-
78
+ <style scoped></style >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
- <h3 >{{title}}</h3 >
4
- <pre >{{valueString}}</pre >
3
+ <h3 >{{ title }}</h3 >
4
+ <pre >{{ valueString }}</pre >
5
5
</div >
6
6
</template >
7
7
<script >
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
5
<div
7
6
class =" btn-group-vertical buttons"
8
7
role =" group"
9
8
aria-label =" Basic example"
10
9
>
11
- <button
12
- class =" btn btn-secondary"
13
- @click =" add"
14
- >Add</button >
15
- <button
16
- class =" btn btn-secondary"
17
- @click =" replace"
18
- >Replace</button >
19
-
10
+ <button class =" btn btn-secondary" @click =" add" >Add</button >
11
+ <button class =" btn btn-secondary" @click =" replace" >Replace</button >
20
12
</div >
21
13
</div >
22
14
23
15
<div class =" col-6" >
24
- <h3 >Draggable {{draggingInfo}}</h3 >
16
+ <h3 >Draggable {{ draggingInfo }}</h3 >
25
17
26
18
<draggable
27
19
:list =" list"
28
20
class =" list-group"
29
- @start =" dragging= true"
30
- @end =" dragging= false"
21
+ @start =" dragging = true"
22
+ @end =" dragging = false"
31
23
>
32
24
<div
33
25
class =" list-group-item"
34
26
v-for =" element in list"
35
27
:key =" element.name"
36
- >{{element.name}}</div >
28
+ >
29
+ {{ element.name }}
30
+ </div >
37
31
</draggable >
38
32
</div >
39
33
40
- <rawDisplayer
41
- class =" col-3"
42
- :value =" list"
43
- title =" List"
44
- />
45
-
34
+ <rawDisplayer class =" col-3" :value =" list" title =" List" />
46
35
</div >
47
-
48
36
</div >
49
37
</template >
50
38
@@ -88,4 +76,3 @@ export default {
88
76
margin-top : 50px ;
89
77
}
90
78
</style >
91
-
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" justify-content-center jumbotron" >
3
-
4
3
<div class =" row" >
5
4
<div class =" col-3" >
6
5
<h3 >Draggable for list 1</h3 >
7
6
<draggable
8
7
class =" dragArea list-group"
9
8
:list =" list1"
10
- :options =" {group:'people'}"
9
+ :options =" { group: 'people' }"
11
10
@change =" log"
12
11
>
13
12
<div
14
13
class =" list-group-item"
15
14
v-for =" (element, index) in list1"
16
15
:key =" element.name"
17
16
>
18
- {{element.name}} {{index}}
17
+ {{ element.name }} {{ index }}
19
18
</div >
20
19
</draggable >
21
20
</div >
25
24
<draggable
26
25
class =" dragArea list-group"
27
26
:list =" list2"
28
- :options =" {group:'people'}"
27
+ :options =" { group: 'people' }"
29
28
@change =" log"
30
29
>
31
30
<div
32
31
class =" list-group-item"
33
32
v-for =" (element, index) in list2"
34
33
:key =" element.name"
35
34
>
36
- {{element.name}} {{index}}
35
+ {{ element.name }} {{ index }}
37
36
</div >
38
37
</draggable >
39
38
</div >
40
39
41
- <rawDisplayer
42
- class =" col-3"
43
- :value =" list1"
44
- title =" List 1"
45
- />
46
-
47
- <rawDisplayer
48
- class =" col-3"
49
- :value =" list2"
50
- title =" List 2"
51
- />
40
+ <rawDisplayer class =" col-3" :value =" list1" title =" List 1" />
52
41
42
+ <rawDisplayer class =" col-3" :value =" list2" title =" List 2" />
53
43
</div >
54
-
55
44
</div >
56
-
57
45
</template >
58
46
<script >
59
47
import draggable from " @/components/Vuedraggable" ;
@@ -93,7 +81,7 @@ export default {
93
81
};
94
82
},
95
83
log : function (evt ) {
96
- console .log (evt);
84
+ window . console .log (evt);
97
85
}
98
86
}
99
87
};
@@ -103,4 +91,3 @@ export default {
103
91
min-height : 10px ;
104
92
}
105
93
</style >
106
-
Original file line number Diff line number Diff line change 1
1
import Vue from "vue" ;
2
- import App from "./App.vue" ;
2
+ import App from "./App.vue" ;
3
3
import "bootstrap/dist/css/bootstrap.min.css" ;
4
4
require ( "bootstrap" ) ;
5
5
6
-
7
6
Vue . config . productionTip = false ;
8
7
9
8
new Vue ( {
Original file line number Diff line number Diff line change 7
7
"scripts" : {
8
8
"serve" : " vue-cli-service serve ./example/main.js --open" ,
9
9
"build" : " vue-cli-service build --name vuedraggable --entry ./src/index.js --target lib" ,
10
- "lint" : " vue-cli-service lint" ,
10
+ "lint" : " vue-cli-service lint src example " ,
11
11
"prepublishOnly" : " npm run lint && npm run build" ,
12
12
"test:unit" : " vue-cli-service test:unit"
13
13
},
You can’t perform that action at this time.
0 commit comments