Skip to content

Commit 7aff274

Browse files
Cleaning
1 parent 32b72e5 commit 7aff274

14 files changed

+175
-63
lines changed

src/App.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,10 @@ import AppBar from '@/layout/AppBar.vue';
4141
import MenuComponent from '@/components/MenuComponent.vue';
4242
import DocsComponent from '@/components/DocsComponent.vue';
4343
import { useCoreStore } from '@/stores/index';
44+
import { DrawerOptions } from '@/components/types';
4445
4546
const store = useCoreStore();
4647
47-
type DrawerOptions = {
48-
absolute: boolean;
49-
color: string;
50-
elevation: number;
51-
};
52-
5348
const drawer = ref<boolean>(true);
5449
const drawerOptions = ref<DrawerOptions>({
5550
absolute: true,

src/components/DocsComponent.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,17 @@ import {
113113
SlotsComponent,
114114
UsageComponent,
115115
} from '@/components/docs';
116+
import { DocClasses } from '@/components/types';
116117
117-
const links: string[] = inject('links');
118+
const links = inject('links');
118119
119-
const classes: string[] = reactive({
120+
const classes = reactive<DocClasses>({
120121
h2: 'v-heading text-h4 text-sm-h4 mb-3',
121122
h3: 'v-heading text-h5 text-sm-h5 mb-1',
122123
headerA: 'text-decoration-none text-right text-md-left',
123124
appLink: 'app-link text-decoration-none primary--text font-weight-medium d-inline-block font-weight-bold',
124125
});
125-
const componentVersion: number = ref(packageInfo.version);
126+
const componentVersion = ref<string>(packageInfo.version);
126127
127128
provide('classes', classes);
128129
</script>

src/components/MenuComponent.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ import { inject, onMounted, reactive, ref } from 'vue';
2323
2424
const drawerOptions = inject('drawerOptions');
2525
26-
const active = ref(true);
27-
const menuItems = reactive([
26+
const active = ref<string>('');
27+
const menuItems = reactive<{
28+
title: string;
29+
icon: string;
30+
href: string;
31+
}[]>([
2832
{ title: 'Home', icon: 'mdi-home', href: '#home' },
2933
{ title: 'Installation', icon: 'mdi-plus-thick', href: '#installation' },
3034
{ title: 'Description', icon: 'mdi-information-outline', href: '#description' },
@@ -65,4 +69,5 @@ function smoothScroll() {
6569
6670
</script>
6771

68-
<style lang="scss"></style>
72+
<style lang="scss">
73+
</style>
Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
11
<template>
22
<v-row>
3-
<v-col id="dependencies" class="mb-5" cols="12">
3+
<v-col
4+
id="dependencies"
5+
class="mb-5"
6+
cols="12"
7+
>
48
<h2 :class="classes.h2">
5-
<a :class="classes.headerA" href="#dependencies">#</a>
9+
<a
10+
:class="classes.headerA"
11+
href="#dependencies"
12+
>#</a>
613
Dependencies
714
</h2>
815

916
<v-row>
1017
<v-col cols="12">
11-
<a :href="store.links.vuetify" target="_blank">Vuetify v3</a>
18+
<a
19+
:href="store.links.vuetify"
20+
target="_blank"
21+
>Vuetify v3</a>
1222
<br />
13-
<a :href="store.links.vue" target="_blank">Vue 3</a>
23+
<a
24+
:href="store.links.vue"
25+
target="_blank"
26+
>Vue 3</a>
1427
</v-col>
1528
</v-row>
1629
</v-col>
@@ -20,8 +33,9 @@
2033
<script setup lang="ts">
2134
import { inject } from 'vue';
2235
import { useCoreStore } from '@/stores/index';
36+
import { DocClasses } from '@/components/types';
2337
24-
const classes: string[] = inject('classes');
38+
const classes = inject<DocClasses>('classes');
2539
2640
const store = useCoreStore();
2741
</script>

src/components/docs/DescriptionComponent.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<template>
22
<v-row>
3-
<v-col id="description" class="mb-5" cols="12">
3+
<v-col
4+
id="description"
5+
class="mb-5"
6+
cols="12"
7+
>
48
<h2 :class="classes.h2">
5-
<a :class="classes.headerA" href="#description">#</a>
9+
<a
10+
:class="classes.headerA"
11+
href="#description"
12+
>#</a>
613
Description
714
</h2>
815

@@ -17,7 +24,8 @@
1724

1825
<script setup lang="ts">
1926
import { inject } from 'vue';
27+
import { DocClasses } from '@/components/types';
2028
21-
const links: string[] = inject('links');
22-
const classes: string[] = inject('classes');
29+
const classes = inject<DocClasses>('classes');
30+
const links = inject('links');
2331
</script>

src/components/docs/EventsComponent.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<template>
22
<v-row>
3-
<v-col id="events" class="mb-5" cols="12">
3+
<v-col
4+
id="events"
5+
class="mb-5"
6+
cols="12"
7+
>
48
<h2 :class="classes.h2">
5-
<a :class="classes.headerA" href="#events">#</a>
9+
<a
10+
:class="classes.headerA"
11+
href="#events"
12+
>#</a>
613
Events
714
</h2>
815

@@ -58,8 +65,9 @@
5865

5966
<script setup lang="ts">
6067
import { inject, ref } from 'vue';
68+
import { DocClasses } from '@/components/types';
6169
62-
const classes: string[] = inject('classes');
70+
const classes = inject<DocClasses>('classes');
6371
6472
const headers: object[] = [
6573
{
@@ -84,5 +92,5 @@ const items: object[] = [
8492
desc: 'TBD',
8593
},
8694
];
87-
const search: string = ref('');
95+
const search = ref<string>('');
8896
</script>

src/components/docs/ExampleComponent.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<template>
22
<v-row>
3-
<v-col id="example" class="mb-5" cols="12">
3+
<v-col
4+
id="example"
5+
class="mb-5"
6+
cols="12"
7+
>
48
<h2 :class="classes.h2">
5-
<a :class="classes.headerA" href="#example">#</a>
9+
<a
10+
:class="classes.headerA"
11+
href="#example"
12+
>#</a>
613
Example
714
</h2>
815

@@ -17,6 +24,7 @@
1724

1825
<script setup lang="ts">
1926
import { inject } from 'vue';
27+
import { DocClasses } from '@/components/types';
2028
21-
const classes: string[] = inject('classes');
29+
const classes = inject<DocClasses>('classes');
2230
</script>

src/components/docs/LegalComponent.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<template>
22
<v-row>
3-
<v-col id="legal" class="mb-5" cols="12">
3+
<v-col
4+
id="legal"
5+
class="mb-5"
6+
cols="12"
7+
>
48
<h2 :class="classes.h2">
5-
<a :class="classes.headerA" href="#legal">#</a>
9+
<a
10+
:class="classes.headerA"
11+
href="#legal"
12+
>#</a>
613
Legal
714
</h2>
815

@@ -20,6 +27,7 @@
2027

2128
<script setup lang="ts">
2229
import { inject } from 'vue';
30+
import { DocClasses } from '@/components/types';
2331
24-
const classes: string[] = inject('classes');
32+
const classes = inject<DocClasses>('classes');
2533
</script>

src/components/docs/LicenseComponent.vue

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
<template>
22
<v-row>
3-
<v-col id="license" class="mb-5" cols="12">
3+
<v-col
4+
id="license"
5+
class="mb-5"
6+
cols="12"
7+
>
48
<h2 :class="classes.h2">
5-
<a :class="classes.headerA" href="#license">#</a>
9+
<a
10+
:class="classes.headerA"
11+
href="#license"
12+
>#</a>
613
License
714
</h2>
815

916
<v-row>
1017
<v-col cols="12">
1118
Copyright &copy; {{ new Date().getFullYear() }}
12-
<a :href="store.links.githubProfile" target="_blank"
13-
>WebDevNerdStuff</a
14-
>
19+
<a
20+
:href="store.links.githubProfile"
21+
target="_blank"
22+
>WebDevNerdStuff</a>
1523
<br />
1624
Licensed under the
1725
<a
@@ -29,8 +37,9 @@
2937
<script setup lang="ts">
3038
import { inject } from 'vue';
3139
import { useCoreStore } from '@/stores/index';
40+
import { DocClasses } from '@/components/types';
3241
33-
const classes: string[] = inject('classes');
42+
const classes = inject<DocClasses>('classes');
3443
3544
const store = useCoreStore();
3645
</script>

src/components/docs/PropsComponent.vue

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
<template>
22
<v-row>
3-
<v-col id="props" class="mb-5" cols="12">
3+
<v-col
4+
id="props"
5+
class="mb-5"
6+
cols="12"
7+
>
48
<h2 :class="classes.h2">
5-
<a :class="classes.headerA" href="#props">#</a>
9+
<a
10+
:class="classes.headerA"
11+
href="#props"
12+
>#</a>
613
Props
714
</h2>
815

@@ -13,7 +20,10 @@
1320
<v-row id="additional-props">
1421
<v-col cols="12">
1522
<h3 :class="classes.h3">
16-
<a :class="classes.headerA" href="#additional-props">#</a>
23+
<a
24+
:class="classes.headerA"
25+
href="#additional-props"
26+
>#</a>
1727
Additional props
1828
</h3>
1929
</v-col>
@@ -50,8 +60,7 @@
5060
class="text-primary"
5161
:class="classes.appLink"
5262
:href="`#props-${item.raw.name}`"
53-
>{{ item.raw.name }}</a
54-
>
63+
>{{ item.raw.name }}</a>
5564
</span>
5665
</td>
5766
</template>
@@ -63,7 +72,10 @@
6372
</template>
6473

6574
<template #[`item.default`]="{ item }">
66-
<td class="text-accent" v-html="item.raw.default"></td>
75+
<td
76+
class="text-accent"
77+
v-html="item.raw.default"
78+
></td>
6779
</template>
6880

6981
<template #[`item.desc`]="{ item }">
@@ -77,7 +89,10 @@
7789
<v-row id="props-not-supported">
7890
<v-col cols="12">
7991
<h3 :class="classes.h3">
80-
<a :class="classes.headerA" href="#props-not-supported">#</a>
92+
<a
93+
:class="classes.headerA"
94+
href="#props-not-supported"
95+
>#</a>
8196
Props with partial and/or no support
8297
</h3>
8398
</v-col>
@@ -103,8 +118,7 @@
103118
class="text-primary"
104119
:class="classes.appLink"
105120
:href="`#props-${item.raw.name}`"
106-
>{{ item.raw.name }}</a
107-
>
121+
>{{ item.raw.name }}</a>
108122
</span>
109123
</td>
110124
</template>
@@ -142,18 +156,20 @@ import {
142156
// watch,
143157
} from 'vue';
144158
// import { DrawerOptions } from '@/types';
159+
import { DocClasses } from '@/components/types';
160+
161+
const classes = inject<DocClasses>('classes');
145162
146-
const emit = defineEmits(['updateOptions']);
163+
// const emit = defineEmits(['updateOptions']);
147164
148165
// const links: string[] = inject('links');
149-
const classes: string[] = inject('classes');
150166
// const drawerOptions: DrawerOptions = inject('drawerOptions');
151167
// const handleColor: string = ref('');
152168
153169
// const defaultOptions: DrawerOptions = {};
154170
// const dialog: boolean = ref(false);
155171
// const options: DrawerOptions = ref(drawerOptions);
156-
const propsSupported: object[] = reactive({
172+
const propsSupported = reactive<object>({
157173
headers: [
158174
{
159175
align: 'start',
@@ -195,7 +211,7 @@ const propsSupported: object[] = reactive({
195211
},
196212
],
197213
});
198-
const propsNotSupported: object[] = reactive({
214+
const propsNotSupported = reactive<object>({
199215
headers: [
200216
{
201217
align: 'start',
@@ -229,7 +245,7 @@ const propsNotSupported: object[] = reactive({
229245
},
230246
],
231247
});
232-
const search: string = ref('');
248+
const search = ref<string>('');
233249
234250
235251
</script>

0 commit comments

Comments
 (0)