Answers for "vue button"

4

@keyup.enter vue

<input v-on:keyup.enter="submit">
<!-- Also works like this: -->
<input @keyup.enter="submit">
Posted by: Guest on July-16-2020
4

vue methods

<template>
  <div id="example">
    <button v-on:click="greet">Greet</button>
  </div>
</template>

<script>
export default {
  methods: {
    greet: function(event) {
      // `event` is the native DOM event
      alert(event.target.tagName);
    }
  }
};
</script>
Posted by: Guest on May-26-2020
0

event vueks

<div id="example-3">
  <button v-on:click="say('salut')">Dire salut</button>
  <button v-on:click="say('quoi')">Dire quoi</button>
</div>
Posted by: Guest on November-04-2020
0

vue methods v-on =!

<div class="nav-right-items menuBtn" @click="test">
methods: {
  test: function() {
    this.mobileClick = !this.mobileClick
  }
},
Posted by: Guest on January-22-2021

Browse Popular Code Answers by Language