[Improvement] Icon: support color property (#1031)

This commit is contained in:
刘建东
2018-05-10 16:10:08 +08:00
committed by neverland
parent 7cdd27826a
commit a92fa7d4a8
3 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
<template>
<i :class="[b(), `van-icon-${name}`]" v-on="$listeners">
<i :class="[b(), `van-icon-${name}`]" :style="{ color }" v-on="$listeners">
<slot />
<div v-if="isDef(info)" :class="b('info')">{{ info }}</div>
</i>
@@ -14,7 +14,8 @@ export default create({
props: {
name: String,
info: [String, Number]
info: [String, Number],
color: String
},
methods: {