解决: Elements in iteration expect to have ‘v-bind:key‘ directives
生活随笔
收集整理的這篇文章主要介紹了
解决: Elements in iteration expect to have ‘v-bind:key‘ directives
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
前些天發現了一個巨牛的人工智能學習網站,通俗易懂,風趣幽默,忍不住分享一下給大家。點擊跳轉到教程。
報錯:
Elements in iteration expect to have 'v-bind:key' directives原本寫法:
<li v-for="site in sites">解決方法1:(親測可行)
<li v-for="site in sites" v-bind:key="site">?
解決方法2:(這一點是在網上查到的,關閉檢查)
更改vetur配置 :?vscode->首選項->設置->搜索(vetur),改成:false 。
?
方法 2 出自:https://blog.csdn.net/xufangfang99/article/details/77882792
總結
以上是生活随笔為你收集整理的解决: Elements in iteration expect to have ‘v-bind:key‘ directives的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C#使用Win32API获得窗口和控件的
- 下一篇: “ 我亦想望,如池鱼悠悠 ... “