Skip to content

Commit 1759740

Browse files
committed
style: prettier formatting
1 parent 2ee6731 commit 1759740

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1056
-1024
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.vdt-action-buttons {
22
display: flex;
33
justify-content: center;
4-
grid-gap: .3em;
5-
}
4+
grid-gap: 0.3em;
5+
}

src/components/ActionButtons/ActionButtons.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,18 @@ export default defineComponent({
44
name: "VdtActionButtons",
55
methods: {
66
triggerAction(action: string) {
7-
this.$emit('userEvent', {
8-
action: action,
9-
data: this.data,
10-
})
11-
}
7+
this.$emit("userEvent", { action: action, data: this.data })
8+
},
129
},
1310
props: {
1411
actions: {
1512
type: Array as () => string[],
16-
default: () => ['view', 'edit', 'delete']
13+
default: () => ["view", "edit", "delete"],
1714
},
1815
actionIcons: {
19-
type: Object as () => ({ [key: string]: string }),
20-
default: () => ({
21-
view: "👁️",
22-
edit: "✏️",
23-
delete: "🗑️",
24-
})
16+
type: Object as () => { [key: string]: string },
17+
default: () => ({ view: "👁️", edit: "✏️", delete: "🗑️" }),
2518
},
26-
data: Object
27-
}
28-
})
19+
data: Object,
20+
},
21+
})
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<template>
22
<div class="vdt-action-buttons">
3-
<button v-for="(action, i) in actions" :key="i"
3+
<button
4+
v-for="(action, i) in actions"
5+
:key="i"
46
class="vdt-btn"
57
:class="`vdt-action-${action}`"
6-
@click="triggerAction(action)">
8+
@click="triggerAction(action)"
9+
>
710
{{ actionIcons[action] }}
811
</button>
912
</div>
1013
</template>
1114
<script src="./ActionButtons.ts" lang="ts"></script>
12-
<style src="./ActionButtons.scss" lang="scss"></style>
15+
<style src="./ActionButtons.scss" lang="scss"></style>

src/components/DataTable.scss

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,33 @@
33
width: 100%;
44
grid-template-columns: 25% 25% 25% 25%;
55

6-
& > .vdt-search, .vdt-pagination, .vdt-export {
7-
margin-left: auto
6+
& > .vdt-search,
7+
.vdt-pagination,
8+
.vdt-export {
9+
margin-left: auto;
810
}
911

1012
@media (min-width: 1401px) {
1113
grid-template-areas:
12-
"perPage search search search"
13-
"table table table table"
14-
"info pagination pagination download";
14+
"perPage search search search"
15+
"table table table table"
16+
"info pagination pagination download";
1517
}
1618

1719
@media (min-width: 1051px) AND (max-width: 1400px) {
1820
grid-template-areas:
19-
"perPage search search search"
20-
"table table table table"
21-
"info pagination pagination pagination"
22-
". . download download";
21+
"perPage search search search"
22+
"table table table table"
23+
"info pagination pagination pagination"
24+
". . download download";
2325
}
2426

2527
@media (min-width: 851px) AND (max-width: 1050px) {
2628
grid-template-areas:
27-
"perPage search search search"
28-
"table table table table"
29-
"pagination pagination pagination pagination"
30-
"info info download download";
29+
"perPage search search search"
30+
"table table table table"
31+
"pagination pagination pagination pagination"
32+
"info info download download";
3133
}
3234

3335
@medi max-width: 800px) {
@@ -38,24 +40,24 @@
3840

3941
@media (min-width: 651px) AND (max-width: 850px) {
4042
grid-template-areas:
41-
"perPage search search search"
42-
"table table table table"
43-
"pagination pagination pagination pagination"
44-
"info info info info"
45-
"download download download download";
43+
"perPage search search search"
44+
"table table table table"
45+
"pagination pagination pagination pagination"
46+
"info info info info"
47+
"download download download download";
4648
}
4749

4850
@media (max-width: 650px) {
4951
grid-template-areas:
50-
"search search search search"
51-
"perPage perPage perPage perPage "
52-
"table table table table"
53-
"pagination pagination pagination pagination"
54-
"info info info info"
55-
"download download download download";
56-
57-
&>.vdt-perpage {
58-
margin-left: auto
52+
"search search search search"
53+
"perPage perPage perPage perPage "
54+
"table table table table"
55+
"pagination pagination pagination pagination"
56+
"info info info info"
57+
"download download download download";
58+
59+
& > .vdt-perpage {
60+
margin-left: auto;
5961
}
6062
}
6163

@@ -71,7 +73,7 @@
7173
.vdt-input {
7274
background-color: #fff;
7375
border: 1px solid #ced4da;
74-
border-radius: .25rem;
76+
border-radius: 0.25rem;
7577
color: #495057;
7678
display: inline-block;
7779
line-height: 1.5;
@@ -94,19 +96,20 @@
9496

9597
.vdt-btn {
9698
border: 1px solid transparent;
97-
border-radius: .25rem;
99+
border-radius: 0.25rem;
98100
cursor: pointer;
99101
color: #fff;
100102
display: inline-block;
101103
font-size: 1rem;
102104
font-weight: 400;
103105
line-height: 1.5;
104-
padding: .375rem .75rem;
106+
padding: 0.375rem 0.75rem;
105107
text-align: center;
106108
vertical-align: middle;
107109
}
108110

109-
.vdt-action-view, .vdt-action-confirm {
111+
.vdt-action-view,
112+
.vdt-action-confirm {
110113
border: 1px solid #28a745;
111114
background-color: #28a745;
112115
&:hover {
@@ -115,7 +118,8 @@
115118
}
116119
}
117120

118-
.vdt-action-edit, .vdt-btn-primary {
121+
.vdt-action-edit,
122+
.vdt-btn-primary {
119123
border: 1px solid #007bff;
120124
background-color: #007bff;
121125
&:hover {

0 commit comments

Comments
 (0)