Answer the question
In order to leave comments, you need to log in
How to change the value of a string in a component?
The parent component renders the child component:
newString(v-for='(item, index) in stringslist.'
:key='item.id'
:info='item'
@delete-string="deleteString(index)"
.example__wrapper
.example__name(v-if="!changeName") {{info.name}}
.example__name_change(v-else)
ul.example__actions
li.example__edit edit
li.example__delete(@click="removeCell") delete
changeName: false
Answer the question
In order to leave comments, you need to log in
PUG, my God, it's good that I dumped him, what a horror, how do you live with him? -_-
down (parent->child) props are slid,
up (child>parent) events
so add change event
newString(v-for='(item, index) in stringslist.'
:key='item.id'
:info='item'
@delete-string="deleteString(index)"
@change="onChange(index, $event)"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question