72
50

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[備忘録] vuejs エラー Elements in iteration expect to have 'v-bind:key' directives

Last updated at Posted at 2019-07-08

Eslintが何か言っている

v-for タグにて、
Elements in iteration expect to have 'v-bind:key' directives

エラーの意味

https://vuejs.org/v2/guide/list.html#Maintaining-State
各項目に一意のキー属性を指定する必要があります とのこと

解決

<th v-for="value in columns">{{ value }}</th>
👇
<th v-for="(value, key) in columns" :key="key">{{ value }}</th>
72
50
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
72
50

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?