mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Icon: code review
This commit is contained in:
parent
28cd16c7f0
commit
3c2e8f4868
@ -65,9 +65,7 @@ Vue.component(Icon.name, Icon);
|
|||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
#### 所有Icons
|
#### 图标列表
|
||||||
|
|
||||||
以下为目前所有的图标:
|
|
||||||
|
|
||||||
:::demo 所有Icon
|
:::demo 所有Icon
|
||||||
```html
|
```html
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<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>
|
||||||
export default {
|
export default {
|
||||||
name: 'van-icon',
|
name: 'van-icon',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -11,12 +11,6 @@
|
|||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
handleIconClick(event) {
|
|
||||||
this.$emit('click', event);
|
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user