Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
背景描述
1、原有的部分功能型icon-font图标会被组件默认转成svg图标(兼容锁定模式)
1、用户侧可能设置了公共尺寸属性,即将width和height设置为auto。
2、svg存在两个尺寸设置,一个是浏览器认为的默认尺寸,一个是组件内设定的默认尺寸。 如果用户侧设置auto后,组件的默认尺寸(1em1em)会被覆盖,而浏览器会按照默认350px150px的尺寸渲染。
主要改动
经调研,无法更改svg图标默认尺寸大小。因为将组件内svg icon的默认1em*1em存尺寸 加上!important来覆盖用户侧的auto配置。
需要注意
icon font-face的方式设置尺寸通过font-size,默认转成svg后,由于默认宽高是1em, 因此也可以通过font-size方式设定svg图标的尺寸。 原则上不需要再设置width和height属性