报错 Custom elements in iteration require ‘v-bind:key’ directives.
- When using the vue-cli tool for development, the following error occurs when using v-for:
- Reason for error: Vue stipulates to use v-for conditional rendering, a key must be set,
- Solution:
1.1 Add key
<el-table-column v-for="(val, key) in tableLabel" :key="key" :prop="key" :label="val"/>