[Vuejs]-Vuetify v-file-input not select file the first time

0๐Ÿ‘

A v-model on the v-file-input is enough

<template>
    <v-container class="px-0" fluid>
        <v-file-input placeholder="Upload Document" required v-model="file" @emptied="file = null">
            <template v-slot:selection="{ text }">
                <v-chip small label color="primary">{{ text }}</v-chip>
            </template>
        </v-file-input>
        Selected filename: {{file? file.name : ''}}
    </v-container>
</template>

<script>
    export default {
        props: ["car"],
        data() {
            return {
                file: null,
            }
        },

        methods: {
        },
    };
</script>

Good luck.

Leave a comment