You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to somehow be able to define a global factory mixin.
Right now the only way of using a factory mixin is within the component definition, but I think that would be could to define the factory mixin as a global mixin which gets its configuration from a custom $option of the component
What does the proposed API look like?
// main.jsfunctionMyFactoryMixin(){}Vue.mixin({beforeBeforeCreate(){// somehow it should happen before instantiating if(!this.$options.custom)return// pushin to current mixins, just a proposalthis.$options.mixins=this.$options.mixins||[]this.$options.mixins.push(MyFactoryMixin(this.$options.custom))}})
You can already achieve that by using the custom option inside of the global mixin and making your mixin behave based on that. Other vue libs like vuefire already do that.
What problem does this feature solve?
I would like to somehow be able to define a global factory mixin.
Right now the only way of using a factory mixin is within the component definition, but I think that would be could to define the factory mixin as a global mixin which gets its configuration from a custom
$option
of the componentWhat does the proposed API look like?
The text was updated successfully, but these errors were encountered: