18. Plugins
Plugins
Writing a Plugin
Plugins usually add global-level functionality to Vue. There is no strictly defined scope for a plugin - there are typically several types of plugins you can write:
-
Add some global methods or properties. e.g. vue-custom-element
-
Add one or more global assets: directives/filters/transitions etc. e.g. vue-touch
-
Add some component options by global mixin. e.g. vuex
-
Add some Vue instance methods by attaching them to Vue.prototype.
-
A library that provides an A