Answer the question
In order to leave comments, you need to log in
Setting a value in vuejs?
Good afternoon! Tell me how to initialize vuejs to read the value from the input? Otherwise, it overwrites input with its value.
new Vue({
el: '#form',
data: {
text: ""
}
});
<input type="text" v-model="text" value="тут текст при редактировании">
Answer the question
In order to leave comments, you need to log in
Just assign a value to a variable:
new Vue({
el: '#form',
data: {
text: "тут текст при редактировании"
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question