S
S
semki0962019-04-30 08:39:10
Vue.js
semki096, 2019-04-30 08:39:10

How to populate input value using vue js?

image is an object, i want to output filename in input using image. But this doesn't work:

<input type="text" name='file_name[]' v-model="image.name" value="">
<script>
            new Vue({
                el: '#app',
                data: {
                    image: [],
                ..........

I can display the file name in data, but this is a duplication. And in general, am I building this input correctly? I will be grateful for help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2019-04-30
@semki096

image is an object

And you have an array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question