Changes the sequence in which plugins are registered
This commit is contained in:
parent
f9378cda25
commit
314b2b054e
2
dist/formulate.esm.js
vendored
2
dist/formulate.esm.js
vendored
File diff suppressed because one or more lines are too long
2
dist/formulate.min.js
vendored
2
dist/formulate.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/formulate.umd.js
vendored
2
dist/formulate.umd.js
vendored
File diff suppressed because one or more lines are too long
@ -61,11 +61,13 @@ class Formulate {
|
||||
*/
|
||||
install (Vue, options) {
|
||||
Vue.prototype.$formulate = this
|
||||
this.options = this.merge(this.defaults, options || {})
|
||||
if (Array.isArray(this.options.plugins) && this.options.plugins.length) {
|
||||
this.options.plugins
|
||||
.forEach(plugin => (typeof plugin === 'function') ? plugin(this) : null)
|
||||
this.options = this.defaults
|
||||
var plugins = this.defaults.plugins
|
||||
if (options && Array.isArray(options.plugins) && options.plugins.length) {
|
||||
plugins = plugins.concat(options.plugins)
|
||||
}
|
||||
plugins.forEach(plugin => (typeof plugin === 'function') ? plugin(this) : null)
|
||||
this.extend(options || {})
|
||||
for (var componentName in this.options.components) {
|
||||
Vue.component(componentName, this.options.components[componentName])
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user