在Vue中,选择正确选项填入components选项中,完成组件局部注册。代码如下:var vm = new Vue({ el: #app, components: { }})
(A)Vue.component('my-comp',{ template: '<h1>Vue组件!</h1>' })
(B)'my-comp': { template: '<h1>Vue组件</h1>' }
(C)Vue.component("my-comp",myComp)
(D)"my-comp":myComp
参考答案
继续答题:下一题