在使用vue组件的数据传输时,不显示代码如下<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Document</title> <script src="https://cdn.jsdelivr.net/npm/vue"></script></head><body> <div id="B1"> <ul> <Bb v-for="list in lists" v-bind:todo="list" v-bind:key="list.id"></Bb> </ul> </div> <script> var B1=new Vue({ el:'#B1', data:{ lists:[ {id:1,text:'djkasbv'}, {id:2,text:'njdkcnsjk'}, {id:3,text:'vonifov'} ] } }); Vue.component('Bb',{ props:['todo'], template:'<li>{{todo.text}}</li>' }) </script></body></html>在浏览器中执行该页面,却没有显示,请问是为什么呢??
添加回答
举报
0/150
提交
取消