报错 Custom elements in iteration require ‘v-bind:key’ directives. 在使用vue-cli工具进行开发时,使用v-for出现如下报错: 报错原因:vue规定使用v-for条件渲染,必须设置一个key,解决方法: 1.1 添加key <el-table-column v-for="(val, key) in tableLabel" :key="key" :prop="key" :label="val"/>