[Vuejs]-Get access to a module class by its name in Vue using vue-property-decorator

0👍

I assume that when you say "Module", you’re referring to Components in Vue. Since using the class syntax for components results in those components being object instances, you can access any members including functions using refs. So, Module_A could invoke functions on Module_B, and Module_B invoke functions on Module_C. To access members of Module_C from Module_A, Module_B would need to expose those through a member of its own.

That said, this isn’t a good idea :). Passing props down the chain is preferred whenever possible.

Leave a comment