<!DOCTYPE html>
<html>
<head>
  <title>Mouse count</title>
  <style>
    #app {
      border: dashed black 1px;
      width: 250px;
      padding: 10px;
    }
	
    img {
      width: 100%;
    }
	
    button {
      margin: 10px;
      padding: 5px 10px;
	  color: red;
    }
	
	p {
		font-weight: bold;
	}
  </style>
</head>
<body>

<h1>Example: Passing Arguments with Methods</h1>

<div id="app" style="text-align:center">
  <p>{{ "Mouse count: " + count }}</p>
	  <button v-on:click="addMoose(1)">+1</button>
	  <button v-on:click="addMoose(5)">+5</button>
	  <button v-on:click="addMoose(-1)">-1</button>
	  <button v-on:click="addMoose(150)">150</button>
	  <button v-on:click="addMoose(-10)">-10</button>
</div>

<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script>
  const app = Vue.createApp({
    data() {
      return {
        count: 0
      }
    },
    methods: {
      addMoose(number) {
        this.count+=number
        /* the same as this.count=this.count+number */
      }
    }
  })
 app.mount('#app')
</script>

</body>
</html>