I use this vue-multiselect plugin: https://vue-multiselect.js.org/
Since I'm going to use it many times, I want to set some defaults props.
For example I want the selectLabel
prop to be an empty string, and maybe to sets some <slot>
s.
In a typical jQuery plugin I could use $.plugin.defaults
to set the defaults. How to do the same with vue plugins?
You can use
extends
to subclass your component. Pass it a spec just like you would use when defining a component, but only supply the things you want to provide defaults for.