Files
directus/app/src/utils/register-component
2020-11-09 12:29:01 -05:00
..
2020-08-11 11:24:14 -04:00
2020-08-11 11:24:14 -04:00
2020-08-11 11:24:14 -04:00

registerComponent

Registers a component into the global Vue context.

Usage

registerComponent('v-button', VButton);

Vue.component() vs registerComponent()

registerComponent internally calls Vue.component() directly, and doesn't do anything else. The function is purely to extend the accepted TypeScript type for the second parameter. Vue accepts the second parameter to be of type Component, yet it's Vue.component() function doesn't actually have that type in it's definition.