view-design / ViewUIPlus

An enterprise-level UI component library and front-end solution based on Vue.js 3
https://www.iviewui.com
Other
368 stars 123 forks source link

[Feature Request]按键添加图标大小设置 #352

Closed yukaichao closed 5 months ago

yukaichao commented 5 months ago

What problem does this feature solve?

在图标里设置按键大小后图标不会同时放大 如<Button icon="md-power" v-width="80" v-height="80"

图标会比较小

What does the proposed API look like?

增加一个iconSize的参数 <Button icon="md-power" v-width="80" v-height="80" iconSize="60"

我尝试更改源码但是不能生效 在props 中添加 iconSize 属性 iconSize: { type: [Number, String], default: undefined },

在 render 函数中的增加size: this.iconSize if (this.loading) { slots.push(h(Icon, { class: 'ivu-load-loop', type: 'ios-loading', size: this.iconSize })); } if ((this.icon || this.customIcon || this.iconSize) && !this.loading) { slots.push(h(Icon, { type: this.icon, custom: this.customIcon, size: this.iconSize })); }

yukaichao commented 5 months ago

还有.d.ts文件里增加了 /**