v-for的某些注意事项
<li v-for="(ties,index) in ties" :key="'Demandschemeli'+index">
<img :src="ties.customer">
<div class="tiessum">
<p>
<b>
{{ties.text}}
</b>
</p>
<input type="button" name="" id="" :value="ties.put" style="float: right;" />
</div>
</li>
如上,v-for后面的in前面需要带一个空格,否则会报错
Error compiling template: Invalid v-for expression: (item,index )in logo
当key重复时,可以使用下述方法,其中的Demandschemeli是指当前div盒子的css样式
:key="'Demandschemeli'+index"
代码改变了我们,也改变了世界

浙公网安备 33010602011771号