Vue Component Register
Allow components to register their subComponents.
// List.vue name: 'List' subComponents: Item: ListItem
Background
See this issue: Allow a component to register its own subComponents
Install
# Yarn yarn add vue-component-register # npm npm i vue-component-register
CDN
Avaliable as window.VueComponentRegister
.
VueComponentRegister
will automatically calls Vue.use()
if Vue
is available as a global variable.
Usage
/* main.js */ Vue VueVue /* App.vue */ name: 'App' // Component-level register components: Step { return <step> <step-item> <list> <list-item>first step</list-item> </list> </step-item> </step> }