vue2.0 dynamically loads multiple identical components, enters different values into the data in the components, and when closing the non-last component, the value destroyed is the last component value.
Component loading method:
component is an array. Get the component to be rendered through a custom event and push it into the component.
<component :is='component[index].component' :params='component[index].params'/>
Close the component:
this.component.splice(i,1);
this.component.splice(i,1);
After destroying the first one, the second one becomes the first one and the third one becomes the second one