Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function InstallComponentsPlugin(components) {
- const nameless = [].concat(components).find(component => !!component.name)
- if (nameless) {
- return console.error(`[Install Components Plugin warn]: Component is missing Name in ${nameless.__file}.`)
- }
- return {
- install(Vue) {
- [].concat(components).forEach(component => Vue.component(component.name, component))
- }
- }
- }
Add Comment
Please, Sign In to add comment