Skip to content

Commit

Permalink
Merge pull request #566 from MMF-FE/master
Browse files Browse the repository at this point in the history
fix #565
  • Loading branch information
ydcss authored Aug 7, 2018
2 parents 5cbd2a1 + b2880ee commit f47174c
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 f47174c

Please sign in to comment.