var Child = { template: '<div>一个自定义组件</div>' } new Vue({ // ... components: { // <my-child></my-child> 将只在父组件模板中可用 'my-child': Child } })
0