Files
directus/app/src/utils/register-component
rijkvanzanten a336998b8d Revert "Flatten utils"
This reverts commit 343599b524.
2020-08-11 11:24:14 -04: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.