title: Add class based on condition (for last rendered element with v-for)
body: <p>I'm making a table in Vue.js and rendering some of the columns with the <code>v-for</code> directive:</p>
  
  <pre><code>&lt;td v-for="(item, index) in items"&gt; {{ item.name }} &lt;/td&gt;
  </code></pre>
  
  <p>There is an unknown element count and I have to add a class to the last rendered element. I cannot use <code>:last-child</code> or <code>:last-of-type</code> because it is not the last <code>&lt;td&gt;</code> element in a row, it is just the last rendered element with <code>v-for</code> but there are also following <code>&lt;td&gt;</code> elements.</p>
  
  <p>How could we achieve this in Vue.js?</p>