V
V
Vyacheslav2017-10-12 20:06:55
Vue.js
Vyacheslav, 2017-10-12 20:06:55

Why is click not working in vue?

When I decided to link the site with vue, of course, I understood that there would be some problems in understanding, but I didn’t think that I would have to run for help for every answer.
Moreover, Google, what off documentation give advice that does not help at all))
Why doesn't @click work?

Vue.component('comment', {
  template: '<button @click="reply">&rarr;</button>',
  props: {
    model: {
      type: Array,
      default: function() {
        return [];
      }
    },
  },
  methods: {
        reply: function() {
    alert(1);
        }
    }
});

@click.native didn't help either

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2017-10-12
@nskarl

Is it possible to see more code? Because what you showed by itself - works .

E
eldar_web, 2017-10-12
@eldar_web

I assume that the vue library of the first version is connected, and the code of the second version.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question