問題
在使用VScode編輯器vue開發(fā)過程中骗村,v-for在Eslint的規(guī)則檢查下出現(xiàn)報錯:Expected ‘v-bind:key’ directives to use the viriables which are defined by the ‘v-for’ directive.
處理
這是因為我們安裝了ESLint插件蓝角,對vue進行了eslint檢查,只需將這個規(guī)則檢查屏蔽掉即可,具體操作如下:
Code——>首選項——>設(shè)置——>在搜索框中輸入:vetur.validation.template——>找到vetur.validation.template:——>將vetur.validation.template左側(cè)單選框中的“√”點掉就ok了。