Icon: code review

This commit is contained in:
陈嘉涵 2017-08-22 17:14:57 +08:00
parent 28cd16c7f0
commit 3c2e8f4868
2 changed files with 10 additions and 18 deletions

View File

@ -65,9 +65,7 @@ Vue.component(Icon.name, Icon);
``` ```
::: :::
#### 所有Icons #### 图标列表
以下为目前所有的图标:
:::demo 所有Icon :::demo 所有Icon
```html ```html

View File

@ -1,5 +1,5 @@
<template> <template>
<i class="van-icon" :class="'van-icon-' + name" @click="handleIconClick"></i> <i :class="['van-icon', 'van-icon-' + name]" @click="$emit('click', $event)" />
</template> </template>
<script> <script>
@ -11,12 +11,6 @@
type: String, type: String,
required: true required: true
} }
},
methods: {
handleIconClick(event) {
this.$emit('click', event);
}
} }
}; };
</script> </script>