[Vuejs]-Get options of component by plugin

0๐Ÿ‘

โœ…

if you set the component up as a global component:

Vue.component('your-component', {
    ready () {
      // ...
    },
    my_plugin: 'test'
})

then you can retrieve it on the vue instance:

var YourComponent = Vue.component('your-component')

and access the my_plugin param:

YourComponent.$options.my_plugin

Leave a comment