tortuvshin / mcute.co.jp

Home Page:http://mcute.co.jp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@click on <n-button> component

tortuvshin opened this issue · comments

This is a common Vue related question and you can easily fix it with @click.native modifier https://vuejs.org/v2/guide/components-custom-events.html#Binding-Native-Events-to-Components

.native modifier is used on components directly

If you are bother by this and don't want to use .native modifier you could add this inside the n-button component


 <button @click="handleClick"

methods: {
  handleClick(evt){
   this.$emit('click', evt);
  }
}

With this custom event passed you don't need to add .native modifier