vue中使用v-for,出现告警!

在项目中运行v-for代码段时,


    
        {{role.value}}
    
出现告警: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.

解决方法:

在代码中绑定key值,可解决,如:


    
        {{role.value}}
    




你可能感兴趣的:(vue笔记)