File tree Expand file tree Collapse file tree 12 files changed +375
-380
lines changed Expand file tree Collapse file tree 12 files changed +375
-380
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" app" >
3
3
<div class =" logo" >
4
- <img alt =" Vue logo" src =" ./assets/logo.png" />
4
+ <a href =" https://github.com/SortableJS/Vue.Draggable" target =" _blank"
5
+ ><img alt =" Vue logo" src =" ./assets/logo.png"
6
+ /></a >
5
7
</div >
6
8
7
9
<div class =" container " >
32
34
v-for =" component in componentList"
33
35
:key =" component.name"
34
36
>
35
- <component :is =" component.name" ></component >
37
+ <div class =" justify-content-center jumbotron" >
38
+ <div class =" row icon" >
39
+ <a
40
+ class =" col-2 icon"
41
+ target =" _blank"
42
+ :href ="
43
+ `https://github.com/SortableJS/Vue.Draggable/blob/master/example/components/${
44
+ component.name
45
+ }.vue`
46
+ "
47
+ >
48
+ <i class =" fa fa-github icon-large" ></i >
49
+ </a >
50
+ </div >
51
+
52
+ <component :is =" component.name" ></component >
53
+ </div >
36
54
</div >
37
55
</div >
38
56
</div >
@@ -109,4 +127,12 @@ export default {
109
127
>>> h3 {
110
128
font-size : 1.4em ;
111
129
}
130
+
131
+ .icon i {
132
+ font-size : 24px ;
133
+ }
134
+
135
+ a {
136
+ color : black ;
137
+ }
112
138
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" justify-content-center jumbotron" >
3
- <div class =" row" >
4
- <div class =" col-3" >
5
- <h3 >Draggable 1</h3 >
6
- <draggable
7
- class =" dragArea list-group"
8
- :list =" list1"
9
- :options =" { group: { name: 'people', pull: 'clone', put: false } }"
10
- @change =" log"
2
+ <div class =" row" >
3
+ <div class =" col-3" >
4
+ <h3 >Draggable 1</h3 >
5
+ <draggable
6
+ class =" dragArea list-group"
7
+ :list =" list1"
8
+ :options =" { group: { name: 'people', pull: 'clone', put: false } }"
9
+ @change =" log"
10
+ >
11
+ <div
12
+ class =" list-group-item"
13
+ v-for =" element in list1"
14
+ :key =" element.name"
11
15
>
12
- <div
13
- class =" list-group-item"
14
- v-for =" element in list1"
15
- :key =" element.name"
16
- >
17
- {{ element.name }}
18
- </div >
19
- </draggable >
20
- </div >
16
+ {{ element.name }}
17
+ </div >
18
+ </draggable >
19
+ </div >
21
20
22
- <div class =" col-3" >
23
- <h3 >Draggable 2</h3 >
24
- <draggable
25
- class =" dragArea list-group"
26
- :list =" list2"
27
- :options =" { group: 'people' }"
28
- @change =" log"
21
+ <div class =" col-3" >
22
+ <h3 >Draggable 2</h3 >
23
+ <draggable
24
+ class =" dragArea list-group"
25
+ :list =" list2"
26
+ :options =" { group: 'people' }"
27
+ @change =" log"
28
+ >
29
+ <div
30
+ class =" list-group-item"
31
+ v-for =" element in list2"
32
+ :key =" element.name"
29
33
>
30
- <div
31
- class =" list-group-item"
32
- v-for =" element in list2"
33
- :key =" element.name"
34
- >
35
- {{ element.name }}
36
- </div >
37
- </draggable >
38
- </div >
34
+ {{ element.name }}
35
+ </div >
36
+ </draggable >
37
+ </div >
39
38
40
- <rawDisplayer class =" col-3" :value =" list1" title =" List 1" />
39
+ <rawDisplayer class =" col-3" :value =" list1" title =" List 1" />
41
40
42
- <rawDisplayer class =" col-3" :value =" list2" title =" List 2" />
43
- </div >
41
+ <rawDisplayer class =" col-3" :value =" list2" title =" List 2" />
44
42
</div >
45
43
</template >
46
44
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" justify-content-center jumbotron" >
3
- <div class =" row" >
4
- <div class =" col-3" >
5
- <h3 >Draggable 1</h3 >
6
- <draggable
7
- class =" dragArea list-group"
8
- :list =" list1"
9
- :options =" { group: { name: 'people', pull: 'clone', put: false } }"
10
- :clone =" cloneDog"
11
- @change =" log"
12
- >
13
- <div
14
- class =" list-group-item"
15
- v-for =" element in list1"
16
- :key =" element.id"
17
- >
18
- {{ element.name }}
19
- </div >
20
- </draggable >
21
- </div >
2
+ <div class =" row" >
3
+ <div class =" col-3" >
4
+ <h3 >Draggable 1</h3 >
5
+ <draggable
6
+ class =" dragArea list-group"
7
+ :list =" list1"
8
+ :options =" { group: { name: 'people', pull: 'clone', put: false } }"
9
+ :clone =" cloneDog"
10
+ @change =" log"
11
+ >
12
+ <div class =" list-group-item" v-for =" element in list1" :key =" element.id" >
13
+ {{ element.name }}
14
+ </div >
15
+ </draggable >
16
+ </div >
22
17
23
- <div class =" col-3" >
24
- <h3 >Draggable 2</h3 >
25
- <draggable
26
- class =" dragArea list-group"
27
- :list =" list2"
28
- :options =" { group: 'people' }"
29
- @change =" log"
30
- >
31
- <div
32
- class =" list-group-item"
33
- v-for =" element in list2"
34
- :key =" element.id"
35
- >
36
- {{ element.name }}
37
- </div >
38
- </draggable >
39
- </div >
18
+ <div class =" col-3" >
19
+ <h3 >Draggable 2</h3 >
20
+ <draggable
21
+ class =" dragArea list-group"
22
+ :list =" list2"
23
+ :options =" { group: 'people' }"
24
+ @change =" log"
25
+ >
26
+ <div class =" list-group-item" v-for =" element in list2" :key =" element.id" >
27
+ {{ element.name }}
28
+ </div >
29
+ </draggable >
30
+ </div >
40
31
41
- <rawDisplayer class =" col-3" :value =" list1" title =" List 1" />
32
+ <rawDisplayer class =" col-3" :value =" list1" title =" List 1" />
42
33
43
- <rawDisplayer class =" col-3" :value =" list2" title =" List 2" />
44
- </div >
34
+ <rawDisplayer class =" col-3" :value =" list2" title =" List 2" />
45
35
</div >
46
36
</template >
47
37
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" justify-content-center jumbotron" >
3
- <div class =" row" >
4
- <div class =" col-8" >
5
- <h3 >Draggable with footer</h3 >
2
+ <div class =" row" >
3
+ <div class =" col-8" >
4
+ <h3 >Draggable with footer</h3 >
6
5
7
- <draggable
8
- :list =" list"
9
- class =" list-group"
10
- :options =" { draggable: '.item' }"
11
- @start =" dragging = true"
12
- @end =" dragging = false"
6
+ <draggable
7
+ :list =" list"
8
+ class =" list-group"
9
+ :options =" { draggable: '.item' }"
10
+ @start =" dragging = true"
11
+ @end =" dragging = false"
12
+ >
13
+ <div
14
+ class =" list-group-item item"
15
+ v-for =" element in list"
16
+ :key =" element.name"
13
17
>
14
- <div
15
- class =" list-group-item item"
16
- v-for =" element in list"
17
- :key =" element.name"
18
- >
19
- {{ element.name }}
20
- </div >
18
+ {{ element.name }}
19
+ </div >
21
20
22
- <div
23
- slot =" footer"
24
- class =" btn-group list-group-item"
25
- role =" group"
26
- aria-label =" Basic example"
27
- >
28
- <button class =" btn btn-secondary" @click =" add" >Add</button >
29
- <button class =" btn btn-secondary" @click =" replace" >Replace</button >
30
- </div >
31
- </draggable >
32
- </div >
33
-
34
- <rawDisplayer class =" col-3" :value =" list" title =" List" />
21
+ <div
22
+ slot =" footer"
23
+ class =" btn-group list-group-item"
24
+ role =" group"
25
+ aria-label =" Basic example"
26
+ >
27
+ <button class =" btn btn-secondary" @click =" add" >Add</button >
28
+ <button class =" btn btn-secondary" @click =" replace" >Replace</button >
29
+ </div >
30
+ </draggable >
35
31
</div >
32
+
33
+ <rawDisplayer class =" col-3" :value =" list" title =" List" />
36
34
</div >
37
35
</template >
38
36
Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" justify-content-center jumbotron" >
3
- <div class =" row" >
4
- <div class =" col-1" >
5
- <button class =" btn btn-secondary button" @click =" add" >Add</button >
6
- </div >
2
+ <div class =" row" >
3
+ <div class =" col-1" >
4
+ <button class =" btn btn-secondary button" @click =" add" >Add</button >
5
+ </div >
7
6
8
- <div class =" col-7" >
9
- <h3 >Draggable {{ draggingInfo }}</h3 >
7
+ <div class =" col-7" >
8
+ <h3 >Draggable {{ draggingInfo }}</h3 >
10
9
11
- <draggable
12
- element =" ul"
13
- :list =" list"
14
- class =" list-group"
15
- :options =" { handle: '.handle' }"
10
+ <draggable
11
+ element =" ul"
12
+ :list =" list"
13
+ class =" list-group"
14
+ :options =" { handle: '.handle' }"
15
+ >
16
+ <li
17
+ class =" list-group-item"
18
+ v-for =" (element, idx) in list"
19
+ :key =" element.name"
16
20
>
17
- <li
18
- class =" list-group-item"
19
- v-for =" (element, idx) in list"
20
- :key =" element.name"
21
- >
22
- <i class =" fa fa-align-justify handle" ></i >
23
-
24
- <span class =" text" >{{ element.name }} </span >
21
+ <i class =" fa fa-align-justify handle" ></i >
25
22
26
- < input type =" text" class = " form-control " v-model = " element.text " / >
23
+ < span class =" text" >{{ element.name }} </ span >
27
24
28
- <i class =" fa fa-times close" @click =" removeAt(idx)" ></i >
29
- </li >
30
- </draggable >
31
- </div >
25
+ <input type =" text" class =" form-control" v-model =" element.text" />
32
26
33
- <rawDisplayer class =" col-3" :value =" list" title =" List" />
27
+ <i class =" fa fa-times close" @click =" removeAt(idx)" ></i >
28
+ </li >
29
+ </draggable >
34
30
</div >
31
+
32
+ <rawDisplayer class =" col-3" :value =" list" title =" List" />
35
33
</div >
36
34
</template >
37
35
You can’t perform that action at this time.
0 commit comments