title: Changing vue instance variables from within component
body: <p>I've been teaching myself Vue.js, and have been utilising components to increase modularity.</p>
  
  <p>One thing that I am struggling with is manipulating variables in the Vue instance from within the component. I have got it working well with <code>v-model</code> within a component by passing the variable in the jade file as a prop</p>
  
  <p>eg <code>loginform(slot="login-form" v-bind:form-submit="loginSubmit" v-bind:login-data="loginData")</code></p>
  
  <p>Where loginData contains variables username &amp; password which are <code>'v-modelled'</code> to the inputs within the component. Then in the component template: </p>
  
  <p><code>&lt;input type="password" class="text-field" v-model="formData.password" /&gt;</code></p>
  
  <p>However I have a tooltip component that I am wanting to use twice: One for the username field &amp; one for the password field. The visibility of these tooltips are given by <code>tooltips.username.vis</code> and <code>tooltips.password.vis</code> respectively. </p>
  
  <p>I can't seem to pass that variable as a prop in order to manipulate without getting the <code>avoid manipulating props</code> warning, despite <code>v-model</code> within the component not giving these warnings. The tooltip component is given below:</p>
  
  <pre><code>Vue.component('tooltip', {
    props: ['show', 'message', 'click'],
    template:
      &lt;transition name="shrink"&gt;
        &lt;div v-show="show" v-on:click="click" class="tooltip"&gt;
          &lt;div class="tooltip-arrow"&gt;&lt;/div&gt;
          &lt;div class="tooltip-container"&gt;{{message}}&lt;/div&gt;
        &lt;/div&gt;
      &lt;/transition&gt;
  }); 
  </code></pre>
  
  <p>Does anyone have any idea on how I can achieve the desired affect (Hiding the tooltip on mouse click). I have tried passing a method as the click prop that has different arguments based on whether the tooltip is for the username or password input, however I get click undefined warnings. I could make two seperate functions but I would rather not explicitly write two functions that do the same thing.</p>