S
S
svilkov872018-08-06 18:14:25
Vue.js
svilkov87, 2018-08-06 18:14:25

How to add a new item through a form in vue?

Good afternoon!
There is a textarea and a ul>li list below it. It is supposed that when Enter is pressed , ul should be updated with a new li element , with the value that was sent from the text field.
Part of this is implemented but can't figure out how to update the array in store.list.
I left a comment on the essence of the problem directly in the code
. There is vuex - it's necessary.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-08-06
@svilkov87

Attach v-model to the textarea so that the entered text is available as a property of the component. When you press enter, you cause the store to mutate.
Does it look like what you need ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question