进入一个页面报错,[Vue warn]: Duplicate keys detected: ‘1’. This may cause an update error. for循环,key重复报错
解决
v-for = (item,inx),:key=“inx”, key的值这样写接可以了
template> <div> <el-select v-model="value" placeholder="请选择" size="mini" @change="change"> <el-option v-for="(item, inx) in reList" :key="inx" :label="item.name" :value="item.type"></el-option> </el-select> </div> </template>