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