UNPKG

buefy

Version:

Lightweight UI components for Vue.js (v3) based on Bulma

15 lines (13 loc) 598 B
const registerComponent = (Vue, component, name) => { const componentName = name || component.name; if (componentName == null) { throw new Error("Buefy.registerComponent: missing component name"); } Vue.component(componentName, component); }; const registerComponentProgrammatic = (Vue, property, component, injectionKey) => { if (!Vue.config.globalProperties.$buefy) Vue.config.globalProperties.$buefy = {}; Vue.config.globalProperties.$buefy[property] = component; Vue.provide(injectionKey, component); }; export { registerComponent as a, registerComponentProgrammatic as r };