Closed yukaichao closed 5 months ago
在图标里设置按键大小后图标不会同时放大 如<Button icon="md-power" v-width="80" v-height="80"
图标会比较小
增加一个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 })); }
还有.d.ts文件里增加了 /**
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 })); }