v-for & duplicate key bug
v-for & duplicate key bug
vue warn & v-for & duplicate key bug
<span class="audit-common-lable">优先级</span>
<h-select
aria-placeholder="优先级"
placeholder="请选择优先级"
style="width:205px"
v-model="commonFilters.priority"
filterable
clearable>
<h-option
v-for="item in priorities"
:value="item.value"
:key="item.value">
{{item.title}}
</h-option>
</h-select>
solution
index & unique key
<span class="audit-common-lable">优先级</span>
<h-select
aria-placeholder="优先级"
placeholder="请选择优先级"
style="width:205px"
v-model="commonFilters.priority"
filterable
clearable>
<h-option
v-for="(item, i) in priorities"
:value="item.value"
:key="i">
{{item.title}}
</h-option>
</h-select>
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10239955.html
未经授权禁止转载,违者必究!