fix: file upload input not working

This commit is contained in:
Fabio Di Stasio 2022-05-10 14:43:08 +02:00
parent e0f85f469f
commit 58611bf07f
4 changed files with 14 additions and 15 deletions

View File

@ -23,6 +23,8 @@
</template>
<script>
import { uidGen } from 'common/libs/uidGen';
export default {
name: 'BaseUploadInput',
props: {
@ -38,12 +40,9 @@ export default {
emits: ['change', 'clear'],
data () {
return {
id: null
id: uidGen()
};
},
mounted () {
this.id = this._uid;
},
methods: {
clear () {
this.$emit('clear');

View File

@ -52,7 +52,7 @@
>
<BaseUploadInput
v-else-if="inputProps().type === 'file'"
:value="selectedValue"
:model-value="selectedValue"
:message="$t('word.browse')"
@clear="clearValue"
@change="filesChange($event)"

View File

@ -96,7 +96,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.databasePath"
:model-value="connection.databasePath"
:message="$t('word.browse')"
@clear="pathClear('databasePath')"
@change="pathSelection($event, 'databasePath')"
@ -211,7 +211,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.key"
:model-value="connection.key"
:message="$t('word.browse')"
@clear="pathClear('key')"
@change="pathSelection($event, 'key')"
@ -224,7 +224,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.cert"
:model-value="connection.cert"
:message="$t('word.browse')"
@clear="pathClear('cert')"
@change="pathSelection($event, 'cert')"
@ -237,7 +237,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.ca"
:model-value="connection.ca"
:message="$t('word.browse')"
@clear="pathClear('ca')"
@change="pathSelection($event, 'ca')"
@ -342,7 +342,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="connection.sshKey"
:model-value="connection.sshKey"
:message="$t('word.browse')"
@clear="pathClear('sshKey')"
@change="pathSelection($event, 'sshKey')"

View File

@ -92,7 +92,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.databasePath"
:model-value="localConnection.databasePath"
:message="$t('word.browse')"
@clear="pathClear('databasePath')"
@change="pathSelection($event, 'databasePath')"
@ -207,7 +207,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.key"
:model-value="localConnection.key"
:message="$t('word.browse')"
@clear="pathClear('key')"
@change="pathSelection($event, 'key')"
@ -220,7 +220,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.cert"
:model-value="localConnection.cert"
:message="$t('word.browse')"
@clear="pathClear('cert')"
@change="pathSelection($event, 'cert')"
@ -233,7 +233,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.ca"
:model-value="localConnection.ca"
:message="$t('word.browse')"
@clear="pathClear('ca')"
@change="pathSelection($event, 'ca')"
@ -330,7 +330,7 @@
</div>
<div class="column col-8 col-sm-12">
<BaseUploadInput
:value="localConnection.sshKey"
:model-value="localConnection.sshKey"
:message="$t('word.browse')"
@clear="pathClear('sshKey')"
@change="pathSelection($event, 'sshKey')"