随笔分类 - Vue
摘要:解决方案一 v-for(v,k)括号后面这里要加空格,不能贴着in,否则会报错 1 <body> 2 3 <section id="app"> 4 <table v-for='(item,index ) in monster'> 5 <tr> 6 <th>名称</th> 7 </tr> 8 <tr>
阅读全文
Vue v-for提示Cannot use v-for on stateful component root element because it renders multiple elements.
摘要:解决方案 v-for应该写在#app定义的内部,而不是平级 错误的代码,v-for 写在了#app平级 1 body> 2 3 <section id="app" v-for='item in monster'> 4 <table> 5 <tr> 6 <th>名称</th> 7 </tr> 8 <t
阅读全文