title: How can I change type attribute from submit to button on vue.js 2?
body: <p>I try like this:</p>
  
  <pre><code>&lt;template&gt;
      &lt;button @click="checkout" class="btn btn-danger pull-right" :type="typeButton"&gt;
          Checkout
      &lt;/button&gt; 
  &lt;/template&gt;
  &lt;script&gt;
      export default {
          methods: {
              data() {
                  return {
                      typeButton: 'submit'
                  }
              },
              checkout(e) {
                  this.typeButton = 'button'
                  ...
              }
          },
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>Which gives the following error:</p>
  
  <blockquote>
    <p>[Vue warn]: Property or method "typeButton" is not defined on the
    instance but referenced during render. Make sure to declare reactive
    data properties in the data option.</p>
  </blockquote>
  
  <p>How can I solve this problem?</p>