javascript - Custom subcomponent receives parent component data, how to use v-for to render multiple subcomponents
PHP中文网2017-05-19 10:44:00
0
1
637
Code first
Now there are 4 objects passed to the child component. How to use v-for to render 4 child components? Should v-for be placed in the template of the parent component or in the child component
It must be placed in the child component, because if you use v-for to render the child component directly in the parent component, you cannot display the data in the object array (regardless of slot)
It must be placed in the child component, because if you use v-for to render the child component directly in the parent component, you cannot display the data in the object array (regardless of slot)