Home > other >  Two Vue instance, how to share into instance in various objects
Two Vue instance, how to share into instance in various objects

Time:02-27


For example,
Let vm1=new Vue ({
Store: new store (),
The router: the new router (),
//other injection objects
});
Now want to create a new Vue instance,
Let vm2=new Vue ({
})
Injection in the vm1 all objects at the same time, he inherited,
How to do?

CodePudding user response:


Cn.vuejs.org




API - Vue. Js

Vue. Js - The Progressive JavaScript Framework

CodePudding user response:

Ok, many thanks!
Just oneself also tried to use Vue instantiation extends option of options, can actually work,
Vue. The extend should be similar with instance option extends function, all in all, thank you very much!

CodePudding user response:

Brother how specific implementation
  • Related