[Vue warn]: Duplicate keys detected: x. This may cause an update error

后端 未结 6 524
我在风中等你
我在风中等你 2021-02-06 22:02

I keep getting an error when I add an item to the array which has duplicate id.

i.e.

active_widgets:Array[4]
0:Object
    id:1
    name:\"Text Blocks\"
         


        
6条回答
  •  长情又很酷
    2021-02-06 22:47

    An alternative method:

    Nesting the v-for elements inside any other element also seems to work.

提交回复
热议问题