Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3-v4 升级后 Icon 有的需要手动修改 #221

Open
yichenw7 opened this issue May 12, 2021 · 5 comments
Open

v3-v4 升级后 Icon 有的需要手动修改 #221

yichenw7 opened this issue May 12, 2021 · 5 comments

Comments

@yichenw7
Copy link

<Button
type={autoCompleteList.length !== bondStrategyTable.dataList.length ? 'primary' : 'normal'}
size={'small'}
icon={}
onClick={this.handleSwitchFilterDetail}
>

icon={‘filter’} icon={} 类似于这种全都要手动修改

@yichenw7
Copy link
Author

Button 中配置的icon属性 npx -p @ant-design/codemod-v4 antd4-codemod src
自动化 处理不了

@crazyair
Copy link
Member

检测支持 icon=“filter”、但是没做 icon={‘filter’} 的兼容,你可以全局查找 icon={‘ 手动替换

@newlife201702
Copy link

Button组件中icon=“filter”这样的写法配合import { Icon } from '@ant-design/compatible';依然不能正确显示图标

@crazyair
Copy link
Member

Button组件中icon=“filter”这样的写法配合import { Icon } from '@ant-design/compatible';依然不能正确显示图标

需要改成 icon={<Icon

@newlife201702
Copy link

newlife201702 commented Nov 25, 2021

Button组件中icon=“filter”改成icon={<Icon type="filter" />}吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants