mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-29 09:49:16 +08:00
[bugfix] Icon: size prop not work (#1634)
This commit is contained in:
parent
b24e21b9cb
commit
1435611262
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<i :class="[b(), `van-icon-${name}`]" :style="{ color, size }" v-on="$listeners">
|
||||
<i :class="[b(), `van-icon-${name}`]" :style="style" v-on="$listeners">
|
||||
<slot />
|
||||
<div v-if="isDef(info)" :class="b('info')">{{ info }}</div>
|
||||
</i>
|
||||
@ -16,6 +16,15 @@ export default create({
|
||||
info: [String, Number],
|
||||
color: String,
|
||||
size: String
|
||||
},
|
||||
|
||||
computed: {
|
||||
style() {
|
||||
return {
|
||||
color: this.color,
|
||||
fontSize: this.size
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user