[Improvement] Icon: add size prop (#1555)

This commit is contained in:
neverland
2018-07-30 17:01:07 +08:00
committed by GitHub
parent 35bf6447bc
commit c0e9fd633a
22 changed files with 183 additions and 180 deletions

View File

@@ -1,5 +1,5 @@
<template>
<i :class="[b(), `van-icon-${name}`]" :style="{ color }" v-on="$listeners">
<i :class="[b(), `van-icon-${name}`]" :style="{ color, size }" 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],
color: String
color: String,
size: String
}
});
</script>