为了账号安全,请及时绑定邮箱和手机立即绑定

Vuejs 使用官网上面的例子

Vuejs 使用官网上面的例子

开满天机 2018-10-19 14:38:02
1.使用vuejs 官网上面的例子,在控制台中发现了错误了,VM2369 vue.js:2658 [Vue warn]: Unknown custom element: <todo-item> - did you register the component correctly? For recursive components, make sure to provide the "name" option. (found in root instance)2.源码:<div id="app-7">   <ol>     <!-- Now we provide each todo-item with the todo object    -->     <!-- it's representing, so that its content can be dynamic -->     <todo-item v-for="item in groceryList" v-bind:todo="item"></todo-item>   </ol></div>Vue.component('todo-item', {  props: ['todo'],  template: '<li>{{ todo.text }}</li>'})var app7 = new Vue({  el: '#app-7',   data: {    groceryList: [       { text: 'Vegetables' },       { text: 'Cheese' },       { text: 'Whatever else humans are supposed to eat' }     ]   } })
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 818 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号