Skip to content

Commit 5e9f5eb

Browse files
update package.json + linting
1 parent ee30fc6 commit 5e9f5eb

File tree

4 files changed

+51
-67
lines changed

4 files changed

+51
-67
lines changed

example/App.vue

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
<template>
22
<div id="app">
3-
<img
4-
alt="Vue logo"
5-
src="./assets/logo.png"
6-
/>
3+
<img alt="Vue logo" src="./assets/logo.png" />
74
<div class="container ">
8-
<ul
9-
class="nav nav-tabs"
10-
role="tablist"
11-
>
5+
<ul class="nav nav-tabs" role="tablist">
126
<li class="nav-item">
137
<a
148
class="nav-link active"
@@ -17,7 +11,8 @@
1711
role="tab"
1812
aria-controls="profile"
1913
aria-selected="true"
20-
>Simple</a>
14+
>Simple</a
15+
>
2116
</li>
2217

2318
<li class="nav-item">
@@ -28,7 +23,8 @@
2823
role="tab"
2924
aria-controls="profile"
3025
aria-selected="false"
31-
>Two Lists</a>
26+
>Two Lists</a
27+
>
3228
</li>
3329

3430
<li class="nav-item">
@@ -39,7 +35,8 @@
3935
role="tab"
4036
aria-controls="profile"
4137
aria-selected="false"
42-
>Clone</a>
38+
>Clone</a
39+
>
4340
</li>
4441

4542
<li class="nav-item">
@@ -50,7 +47,8 @@
5047
role="tab"
5148
aria-controls="profile"
5249
aria-selected="false"
53-
>Handler</a>
50+
>Handler</a
51+
>
5452
</li>
5553

5654
<li class="nav-item">
@@ -61,7 +59,8 @@
6159
role="tab"
6260
aria-controls="profile"
6361
aria-selected="false"
64-
>Transition</a>
62+
>Transition</a
63+
>
6564
</li>
6665

6766
<li class="nav-item">
@@ -72,7 +71,8 @@
7271
role="tab"
7372
aria-controls="profile"
7473
aria-selected="false"
75-
>Transitions</a>
74+
>Transitions</a
75+
>
7676
</li>
7777

7878
<li class="nav-item">
@@ -83,7 +83,8 @@
8383
role="tab"
8484
aria-controls="profile"
8585
aria-selected="false"
86-
>Footer slot</a>
86+
>Footer slot</a
87+
>
8788
</li>
8889

8990
<li class="nav-item">
@@ -94,15 +95,12 @@
9495
role="tab"
9596
aria-controls="profile"
9697
aria-selected="false"
97-
>Header slot</a>
98+
>Header slot</a
99+
>
98100
</li>
99-
100101
</ul>
101102

102-
<div
103-
class="tab-content"
104-
id="tab-content"
105-
>
103+
<div class="tab-content" id="tab-content">
106104
<div
107105
class="tab-pane show active"
108106
id="simple"
@@ -166,7 +164,7 @@
166164
<transition-example />
167165
</div>
168166

169-
<div
167+
<div
170168
class="tab-pane show"
171169
id="transitions"
172170
role="tabpanel"
@@ -189,7 +187,6 @@ import handler from "./components/handler";
189187
import transitionExample from "./components/transition-example";
190188
import transitionExample2 from "./components/transition-example-2";
191189
192-
193190
export default {
194191
name: "app",
195192
components: {

example/components/transition-example-2.vue

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<template>
22
<div class="justify-content-center jumbotron">
33
<div class="row">
4-
54
<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>
108
</div>
119

1210
<div class="col-6">
@@ -21,7 +19,7 @@
2119
>
2220
<transition-group
2321
type="transition"
24-
:name="!drag? 'flip-list' : null"
22+
:name="!drag ? 'flip-list' : null"
2523
>
2624
<li
2725
class="list-group-item"
@@ -30,8 +28,8 @@
3028
>
3129
<i
3230
:class="
33-
element.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
34-
"
31+
element.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
32+
"
3533
@click="element.fixed = !element.fixed"
3634
aria-hidden="true"
3735
></i>
@@ -41,15 +39,9 @@
4139
</draggable>
4240
</div>
4341

44-
<rawDisplayer
45-
class="col-3"
46-
:value="list"
47-
title="List"
48-
/>
49-
42+
<rawDisplayer class="col-3" :value="list" title="List" />
5043
</div>
5144
</div>
52-
5345
</template>
5446

5547
<script>
@@ -81,9 +73,9 @@ export default {
8173
drag: false
8274
};
8375
},
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);
8779
}
8880
},
8981
computed: {

example/components/transition-example.vue

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<template>
22
<div class="justify-content-center jumbotron">
33
<div class="row">
4-
54
<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>
108
</div>
119

1210
<div class="col-6">
@@ -19,19 +17,16 @@
1917
@start="isDragging = true"
2018
@end="isDragging = false"
2119
>
22-
<transition-group
23-
type="transition"
24-
:name="'flip-list'"
25-
>
20+
<transition-group type="transition" :name="'flip-list'">
2621
<li
2722
class="list-group-item"
2823
v-for="element in list"
2924
:key="element.order"
3025
>
3126
<i
3227
:class="
33-
element.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
34-
"
28+
element.fixed ? 'fa fa-anchor' : 'glyphicon glyphicon-pushpin'
29+
"
3530
@click="element.fixed = !element.fixed"
3631
aria-hidden="true"
3732
></i>
@@ -41,15 +36,9 @@
4136
</draggable>
4237
</div>
4338

44-
<rawDisplayer
45-
class="col-3"
46-
:value="list"
47-
title="List"
48-
/>
49-
39+
<rawDisplayer class="col-3" :value="list" title="List" />
5040
</div>
5141
</div>
52-
5342
</template>
5443

5544
<script>
@@ -80,9 +69,9 @@ export default {
8069
})
8170
};
8271
},
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);
8675
}
8776
},
8877
computed: {

package.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111
"prepublishOnly": "npm run lint && npm run build",
1212
"test:unit": "vue-cli-service test:unit"
1313
},
14+
"keywords": [
15+
"vue",
16+
"vuejs",
17+
"drag",
18+
"and",
19+
"drop",
20+
"list",
21+
"Sortable.js",
22+
"component"
23+
],
1424
"dependencies": {
1525
"sortablejs": "^1.8.3",
1626
"vue": "^2.5.22"
@@ -87,9 +97,5 @@
8797
"dist/*.js",
8898
"src/*"
8999
],
90-
"keywords": [
91-
"vue",
92-
"component"
93-
],
94100
"module": "dist/vuedraggable.common.min.js"
95-
}
101+
}

0 commit comments

Comments
 (0)