-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix: LocaleProvider warning after antd@3.21 #2941
Conversation
Pull Request Test Coverage Report for Build 4993
💛 - Coveralls |
Pull Request Test Coverage Report for Build 5147
💛 - Coveralls |
这对 antd 的版本有要求吧? |
@sorrycc 嗯,看 umi-plugin-react 里写的是 |
什么版本开始的?umi-plugin-react 会优先用项目里依赖的 antd 版本,如果用户手写了低版本 antd,会有 break-change 。 |
需要判断下 antd version @chenshuai2144 mac 机器重启下,一直卡住 |
{ret} | ||
</LocaleProvider>); | ||
</ConfigProvider>); | ||
{{/antd}} | ||
return ret; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这句话在有antd的时候是多余的,是否需要去掉?
@@ -122,9 +122,9 @@ class LocaleWrapper extends React.Component{ | |||
</IntlProvider>) | |||
{{/localeList.length}} | |||
{{#antd}} | |||
return (<LocaleProvider locale={appLocale.antd ? (appLocale.antd.default || appLocale.antd) : defaultAntd}> | |||
return (<ConfigProvider locale={appLocale.antd ? (appLocale.antd.default || appLocale.antd) : defaultAntd}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { version, LocaleProvider, ConfigProvider } from 'antd';
const AntdProvider = Number(major) > 3 || Number(major) >= 3 && Number(minor) >= 21 ? ConfigProvider : LocaleProvider;
<AntdProvider ...
c5246d0
to
e5af6ac
Compare
* fix: judge antd version * fix: format * fix: ci
实现有些问题,在 #2992 回滚,后面提新的 PR 再处理。 |
请问这个问题好了吗,已有的项目改如何操作才能去掉这个警告啊 |
@ycjcl868 您好,我看到umi的发布日志上解决了有说解决了这个问题,但是我不知道我该如何操作。。是要更新什么呢? |
@zhipingzhang 还没,今天更新个版本修复,不需要操作什么,重装依赖就好。 |
您好,我刚刚试了下删掉node_modules,用npm-check-updates更新package.json全部依赖到最新版本,然后yarn安装,发现还是存在这些报错呀 |
似乎现在重装依赖还是有这个问题。。 |
|
Checklist
npm test
passesClose #2962 #2966 ant-design/ant-design-pro#5014
Description of change