Skip to content

Commit

Permalink
fix #565
Browse files Browse the repository at this point in the history
  • Loading branch information
vfasky committed Apr 14, 2018
1 parent 205bda7 commit b2880ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/button/src/button.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<button :disabled="disabled" :class="classes" :style="{backgroundColor: bgcolor, color: color}" :type="actionType">
<button @click="handleClick" :disabled="disabled" :class="classes" :style="{backgroundColor: bgcolor, color: color}" :type="actionType">
<slot></slot>
</button>
</template>
Expand Down Expand Up @@ -60,6 +60,11 @@
}
return s + ' ' + b + (this.shape === 'circle' ? ' yd-btn-circle' : '');
}
},
methods: {
handleClick(evt) {
this.$emit('click', evt);
}
}
}
</script>
Expand Down

0 comments on commit b2880ee

Please sign in to comment.