Skip to content

Commit

Permalink
Adding a hint to ImageUpload.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtuGit committed Mar 12, 2021
1 parent 008968a commit 2acca76
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion components/UI/ImageUpload.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
- Developed by Artu, https://github.com/ArtuGit
- Copyleft 2020-2021.
- Copyleft, 2020-2021.
-->
<template>
<div class="mt-4">
Expand All @@ -24,6 +24,8 @@
label="Image file"
type="file"
accept="image/*"
:hint="hint"
:persistent-hint="hint"
@change="processImage"
></v-file-input>
</v-col>
Expand Down Expand Up @@ -52,6 +54,15 @@ export default {
imageDialogObj: null,
}
},
computed: {
hint() {
if (this.imageDialogObj) {
return ''
} else {
return 'Leave blank to get an image automatically'
}
},
},
watch: {
async imageExisted(newVal, oldVal) {
this.imageDialogURLTemp = newVal
Expand Down

0 comments on commit 2acca76

Please sign in to comment.