R
R
rockerok_n2018-04-28 17:29:33
Vue.js
rockerok_n, 2018-04-28 17:29:33

How to assign the value obtained from props to a variable in Vue.js?

Please tell me how to assign an object received from the parent component via props to a variable in data? I tried to use v-bind in the html template, but the value of the variable does not change when receiving data from outside.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-04-28
@rokerok_n

Why not use a value from props in the template, instead of having to worry about change tracking, etc.?
Well, of course, you can use watch to monitor the change in props, and reassign what you need there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question