Skip to content

Commit 48d76a6

Browse files
fix: correct all warnings in devtools
1 parent 78093d3 commit 48d76a6

File tree

20 files changed

+85
-49
lines changed

20 files changed

+85
-49
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ VUE_APP_TITLE="Dev - Ionic Vue Boilerplate"
22
VUE_APP_PORT="8080"
33
VUE_APP_API_URL="http://localhost:8000"
44
VUE_APP_CURRENT_SITE_ADDRESS="http://localhost:${VUE_APP_PORT}"
5-
VUE_APP_IMAGES_ADDRESS="https://qa.api.boilerplate.com/medias"
5+
VUE_APP_IMAGES_ADDRESS="http://localhost:8080"
66
VUE_APP_WHATS_TELEPHONE="+559999999999"
77
VUE_APP_CONTACT_EMAIL="contact@boilerplate.com"

public/assets/icon/logo.png

36.3 KB
Loading

src/components/Divider.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from '@ionic/vue';
1313
1414
export default {
15+
name: 'Divider',
1516
components: {
1617
IonCol,
1718
IonItem,

src/components/ErrorMessage.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { IonText } from '@ionic/vue';
99
1010
export default {
11+
name: 'ErrorMessage',
1112
components: {
1213
IonText,
1314
},

src/components/Image.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<template>
22
<ion-img
33
:src="
4-
!imageFailsToLoad && !!src
5-
? `${getImagesAddress}${src}`
6-
: defaultImage
4+
!imageFailsToLoad && !!src ? `${getImagesAddress}/${src}` : defaultImage
75
"
86
@ionError="imageFailsToLoad = true"
97
/>
108
</template>
119

1210
<script>
11+
import { IonImg } from '@ionic/vue';
12+
1313
import { ref } from '@vue/reactivity';
1414
import { mapGetters } from 'vuex';
1515
@@ -19,7 +19,7 @@ export default {
1919
/** The image path or url */
2020
src: {
2121
type: String,
22-
required: true,
22+
required: false,
2323
},
2424
},
2525
computed: {
@@ -33,5 +33,8 @@ export default {
3333
defaultImage: 'assets/vectors/blank.svg',
3434
};
3535
},
36+
components: {
37+
IonImg,
38+
},
3639
};
3740
</script>

src/components/Menu.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
class="fs-16"
3434
></ion-icon>
3535
</ion-item>
36-
<span v-else-if="menuItem.type === 2 && (i !== appPages.length - 1)">
36+
<span v-else-if="menuItem.type === 2 && (index !== appPages.length - 1)">
3737
<hr />
3838
</span>
39-
<span v-else-if="menuItem.type === 'category' && (i !== appPages.length - 1)">
39+
<span v-else-if="menuItem.type === 'category' && (index !== appPages.length - 1)">
4040
<ion-item>
4141
<h1 class="">
4242
<b>{{ menuItem.title }}</b>
@@ -73,7 +73,6 @@ import {
7373
IonHeader,
7474
IonToolbar,
7575
IonTitle,
76-
IonImg,
7776
} from '@ionic/vue';
7877
7978
import { ref } from 'vue';
@@ -88,7 +87,6 @@ export default {
8887
components: {
8988
IonContent,
9089
IonIcon,
91-
IonImg,
9290
IonItem,
9391
IonLabel,
9492
IonList,

src/components/NoContent.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import { IonImg, IonText } from '@ionic/vue';
1111
1212
export default {
13+
name: 'NoContent',
1314
components: {
1415
IonImg, IonText,
1516
},

src/components/base/BaseLayout.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import {
4242
IonBackButton,
4343
IonButtons,
4444
IonMenuButton,
45+
IonText,
4546
} from '@ionic/vue';
4647
import { useRouter } from 'vue-router';
4748
@@ -70,6 +71,7 @@ export default {
7071
},
7172
},
7273
components: {
74+
IonText,
7375
IonPage,
7476
IonHeader,
7577
IonToolbar,

src/components/inputs/File.vue

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
<template>
2-
<Button
3-
:size="size"
4-
:text="iconOnly ? '' : label"
5-
:icon="icon"
6-
:iconOnly="iconOnly"
7-
:isLoading="loading"
8-
@click="openCamera ? getFilesByCamera() : getFiles()"
9-
/>
10-
<ion-input
11-
hidden
12-
class="d-none"
13-
type="file"
14-
ref="fileInput"
15-
:multiple="multiple"
16-
:accept="`${accept};capture=camera`"
17-
@change="filesChange"
18-
/>
2+
<div>
3+
<Button
4+
:size="size"
5+
:text="iconOnly ? '' : label"
6+
:icon="icon"
7+
:iconOnly="iconOnly"
8+
:isLoading="loading"
9+
@click="openCamera ? getFilesByCamera() : getFiles()"
10+
/>
11+
<ion-input
12+
hidden
13+
class="d-none"
14+
type="file"
15+
ref="fileInput"
16+
:multiple="multiple"
17+
:accept="`${accept};capture=camera`"
18+
@change="filesChange"
19+
/>
20+
</div>
1921
</template>
2022

2123
<script>
@@ -75,7 +77,8 @@ export default {
7577
},
7678
methods: {
7779
getFiles() {
78-
const fileInput = this.$refs.fileInput.$el.getElementsByTagName('input')[0];
80+
const fileInput =
81+
this.$refs.fileInput.$el.getElementsByTagName('input')[0];
7982
fileInput.click();
8083
},
8184
async getFilesByCamera() {
@@ -89,13 +92,15 @@ export default {
8992
},
9093
dataUriToBlob(dataURI) {
9194
const splitDataURI = dataURI.split(',');
92-
const byteString = splitDataURI[0].indexOf('base64') >= 0
93-
? atob(splitDataURI[1])
94-
: decodeURI(splitDataURI[1]);
95+
const byteString =
96+
splitDataURI[0].indexOf('base64') >= 0
97+
? atob(splitDataURI[1])
98+
: decodeURI(splitDataURI[1]);
9599
const mimeString = splitDataURI[0].split(':')[1].split(';')[0];
96100
97101
const ia = new Uint8Array(byteString.length);
98-
for (let i = 0; i < byteString.length; i++) ia[i] = byteString.charCodeAt(i);
102+
for (let i = 0; i < byteString.length; i++)
103+
ia[i] = byteString.charCodeAt(i);
99104
100105
return new Blob([ia], { type: mimeString });
101106
},

src/components/inputs/SelectExample.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
v-model="Fields.value"
1111
@ionChange="
1212
() => {
13-
$emit('update:value', Fields.value);
13+
$emit('update:modelValue', Fields.value);
1414
Errors.value = null;
1515
}
1616
"
@@ -49,7 +49,7 @@ import Button from '../Button.vue';
4949
5050
export default {
5151
name: 'SelectExample',
52-
emits: ['update:value'],
52+
emits: ['update:modelValue'],
5353
components: {
5454
IonLabel,
5555
IonSelect,
@@ -66,7 +66,7 @@ export default {
6666
type: String,
6767
default: 'Cancel',
6868
},
69-
value: {
69+
modelValue: {
7070
required: true,
7171
},
7272
disabled: {
@@ -139,7 +139,7 @@ export default {
139139
},
140140
cleanSelect() {
141141
this.Fields.value = null;
142-
this.$emit('update:value', this.Fields.value);
142+
this.$emit('update:modelValue', this.Fields.value);
143143
this.Errors.value = null;
144144
},
145145
},

0 commit comments

Comments
 (0)