vue开发中v-for在Eslint的规则检查下出现:Expected ‘v-bind:key’ directives to use the viriables错误
原代码写错:
v-for="item in textList" :key="index"
正确写法:
v-for="item in textList" :key="item.index"
后面key值写上 item.index
(附链接:)
https://cn.vuejs.org/v2/guide/list.html#用-v-for-把一个数组对应为一组元素