title: Toggle form inside v-for using vue.js
body: <p>How can i toggle form inside v-for loop,I have a form inside v-for which i want to display (toggle) on click.
  But when i click all the form inside the v-for gets toggled.</p>
  
  <p>Secondly is it better approach to keep the form inside the loop,when have large amount of data inside loop or load it as a separate component.</p>
  
  <p>This is what i am trying to do.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>new Vue({
    el: "#app",
    data: {
      todos: [{
          text: "Learn JavaScript"
        },
        {
          text: "Learn Vue"
        },
        {
          text: "Play around in JSFiddle"
        },
        {
          text: "Build something awesome"
        }
      ],
      show: ''
    },
    methods: {
      toggle: function(todo) {
        this.show = !this.show
      }
    }
  })</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    background: #20262E;
    padding: 20px;
    font-family: Helvetica;
  }
  
  #app {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    transition: all 0.2s;
  }
  
  li {
    margin: 8px 0;
  }
  
  h2 {
    font-weight: bold;
    margin-bottom: 15px;
  }
  
  del {
    color: rgba(0, 0, 0, 0.3);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"&gt;&lt;/script&gt;
  &lt;div id="app"&gt;
    &lt;h2&gt;Todos:&lt;/h2&gt;
    &lt;ol&gt;
      &lt;li v-for="(todo,key) in todos"&gt;
        &lt;p&gt;
          {{ key+1 }} - {{ todo.text}} &lt;span @click="toggle(todo)"&gt;&lt;b&gt;Contact&lt;/b&gt;&lt;/span&gt;
          &lt;div v-if="show"&gt;
            &lt;hr /&gt;
            &lt;p&gt;
              &lt;label&gt;Message&lt;/label&gt;
              &lt;input type="text"&gt;
            &lt;/p&gt;
            &lt;hr /&gt;
          &lt;/div&gt;
        &lt;/p&gt;
      &lt;/li&gt;
    &lt;/ol&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>