The scope of a variable in vue mode
1 answer
It looks like you are returning an object, so you can apply this method and use v-forfor repetition, for example:
<div>
<p v-for=" (val, key) in getPerson(id)">{{key}}: {{val}}</p>
</div>
The documentation has more information: https://vuejs.org/v2/guide/list.html#Object-v-for
0