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

[Vue warn]: Duplicate keys detected: ‘0’. This may cause an update error. 剛開始看到這個問題我還有點奇怪,因爲只在for循環哪裏用到了key屬性,後面查了下發現是同級v-for的key值一樣造成報錯。 控制檯報錯: 報錯代碼: 修改後代碼 補充:如果有大神路過知道是什麼原理請在評論區指點一下,謝謝!
相關文章
相關標籤/搜索