Communication between vue Parent and Child Components

  node.js, question

I am a sub-component in the parent template inside loop. How do I define the variables of the for inside loop to be realized in the sub-component template inside?
Such direct output variables cannot be found in extend inside. Please ask the great god how to deal with this situation.

Look at documents …

Data cannot be passed to the component because the scope of the component is isolated. To pass data to a component, props should be used:

 v-for="item in items"

The reason why item is not automatically injected into the component is that it will cause the component to be tightly coupled with the current v-for. Explicitly declare where the data comes from so that components can be reused elsewhere.