Answers for "on:click.prevent in vue"

0

on:click.prevent in vue

const app = new Vue({
  data: () => ({}),
  methods: {
    myMethod: function myMethod(ev) {
      console.log(ev); // MouseEvent { ... }
    }
  },
  template: `
    <div>
      <a v-on:click.prevent="myMethod($event)" href="/">Click Me</a>
    </div>
  `
});
Posted by: Guest on October-28-2021
0

on:click.prevent in vue

const app = new Vue({
  data: () => ({}),
  methods: {
    myMethod: function myMethod(ev) {
      console.log(ev); // MouseEvent { ... }
    }
  },
  template: `
    <div>
      <a v-on:click.prevent="myMethod($event)" href="/">Click Me</a>
    </div>
  `
});
Posted by: Guest on October-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language