Commit 9272508e9cb17748f2b22ecf0248c71c32d44985
Committed by
GitHub
1 parent
049dcf59
Update icon.vue
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
src/components/icon/icon.vue
1 | 1 | <template> |
2 | - <i :class="classes" :style="styles" @click="$emit('click')"></i> | |
2 | + <i :class="classes" :style="styles" @click="handleClick"></i> | |
3 | 3 | </template> |
4 | 4 | <script> |
5 | 5 | const prefixCls = 'ivu-icon'; |
... | ... | @@ -28,6 +28,11 @@ |
28 | 28 | |
29 | 29 | return style; |
30 | 30 | } |
31 | + }, | |
32 | + methods: { | |
33 | + handleClick (event) { | |
34 | + this.$emit('click', event); | |
35 | + } | |
31 | 36 | } |
32 | 37 | }; |
33 | 38 | </script> | ... | ... |