{"id":9921,"date":"2019-05-28T16:28:30","date_gmt":"2019-05-28T07:28:30","guid":{"rendered":"https:\/\/www.itblog.jp\/?p=9921"},"modified":"2019-05-28T16:30:39","modified_gmt":"2019-05-28T07:30:39","slug":"vue-js%e3%81%a7%e3%80%81v-for%e3%83%87%e3%82%a3%e3%83%ac%e3%82%af%e3%83%86%e3%82%a3%e3%83%96%e3%81%aekey%e3%81%ae%e6%84%8f%e5%91%b3","status":"publish","type":"post","link":"https:\/\/www.itblog.jp\/?p=9921","title":{"rendered":"Vue.js\u3067\u3001v-for\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u306e:key\u306e\u610f\u5473"},"content":{"rendered":"\n<p>Vue.js\u3067\u3001Vue\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30fc\u30bf\u3092\u30eb\u30fc\u30d7\u3055\u305b\u308b\u3068\u304d\u306b\u3001v-for\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>&lt;li :v-for=&#8221;\u5909\u6570 in Vue\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30fc\u30bf\u540d&#8221;&gt;{{ \u5909\u6570.\u30c7\u30fc\u30bf\u540d }}&lt;\/li&gt;<\/p>\n\n\n\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306a\u611f\u3058\u3067\u4f7f\u3044\u307e\u3059\u304c\u3001\u3044\u308d\u3044\u308d\u306a\u30b5\u30a4\u30c8\u3067\u30b3\u30fc\u30c9\u306e\u30b5\u30f3\u30d7\u30eb\u3092\u898b\u3066\u3044\u3066\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u3060\u3051\u306e\u3068\u304d\u3082\u3042\u308c\u3070<\/p>\n\n\n\n<p>&lt;li :v-for=&#8221;\u5909\u6570 in Vue\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30fc\u30bf\u540d&#8221; :key=&#8221;\u5909\u6570.id&#8221;&gt;{{ \u5909\u6570.\u30c7\u30fc\u30bf\u540d }}&lt;\/li&gt;<\/p>\n\n\n\n<p>\u306e\u3088\u3046\u306b\u3001:key\u304c\u3064\u3044\u3066\u3044\u308b\u5834\u5408\u3068\u3064\u3044\u3066\u3044\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f55\u306e\u305f\u3081\u306b :key \u304c\u3064\u3044\u3066\u3044\u308b\u306e\u304b\u8abf\u3079\u3066\u307f\u305f\u306e\u3067\u3059\u304c\u3001Vue\u306e\u6a5f\u80fd\u3067DOM\u3092\u66f8\u304d\u63db\u3048\u305f\u6642\u306b\u3001key\u3092\u6307\u5b9a\u3057\u3066\u3044\u306a\u3044\u3068\u3001\u9806\u756a\u304c\u5909\u308f\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308b\u305d\u3046\u3067\u3001\u3064\u3051\u3066\u304a\u304f\u3053\u3068\u3067\u4e26\u3073\u9806\u3092\u4fdd\u6301\u3067\u304d\u308b\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vue.js\u3067\u3001Vue\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30fc\u30bf\u3092\u30eb\u30fc\u30d7\u3055\u305b\u308b\u3068\u304d\u306b\u3001v-for\u30c7\u30a3\u30ec\u30af\u30c6\u30a3\u30d6\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 &lt;li :v-for=&#8221;\u5909\u6570 in Vue\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30fc\u30bf\u540d&#8221;&gt;{{ \u5909\u6570. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[157,131],"tags":[],"class_list":["post-9921","post","type-post","status-publish","format-standard","hentry","category-vue-js","category-131"],"_links":{"self":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9921","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9921"}],"version-history":[{"count":0,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=\/wp\/v2\/posts\/9921\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9921"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9921"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itblog.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9921"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}