Does vue call one component at a time to instantiate a component?

write a carousel component using vue, which is required for both pages. But the pictures of the two rounds are different and are obtained by request.

<swiper :simg="fimg"></swiper>

call the subcomponent, and after the request is successful, pass the link to the subcomponent picture. But this is not similar to the instantiation of the face object, the carousel component is the prototype XPIA page call instantiates an object Z, and then modifies the properties and methods of the Z. The same is true of the B page.

Jul.07,2021

each time the component is called, it is a new initialization, and the two calls do not affect each other!


The instantiation of the

component is created when it first appears, and all that's left is to update itself.
when you update data, or prop, it calculates whether to update the DOM element that depends on it.

instances are discarded only when it is determined that they are not needed.

The update of the

instance uses the dependency collection principle and accesses other people's properties, and the instance will be collected.

this instance is removed from the dependency collection array when it is determined that it is not needed. The instance itself is also uninstalled.

Menu