Check out example codes for "methods vue class component". It will help you in understanding the concepts better.

Code Example 1

<template>
  <button v-on:click="hello">Click</button>
</template>

<script>
import Vue from 'vue'
import Component from 'vue-class-component'

@Component
export default class HelloWorld extends Vue {
  // Declared as component method
  hello() {
    console.log('Hello World!')
  }
}
</script>

Learn ReactJs, React Native from akashmittal.com