-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
The ConfigProvider
component cannot dynamically change the language
#4225
Labels
Comments
github-actions
bot
changed the title
The Jun 18, 2021
ConfigProvider
组件无法动态改变语言ConfigProvider
component cannot dynamically change the language
或许跟 |
tangjinzhou
added a commit
that referenced
this issue
Jun 18, 2021
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
看了一下组件源码,发现在监听
props
时,直接将新的props
值与configProvider
进行了一次合并,但这次新的props
对象的值不只有传入的locale
还有其他的属性,但这些属性的值都是undefined
,这样会导致合并时将configProvider
一次是生成的getPrefixCls
属性方法替换成undefined
,在之后的组件使用configProvider.getPrefixCls
就会报错。Version
vue: v3.1.1
ant-design-vue: v2.2.0-bate.3
Reproduction link
github
codesandbox
Steps to reproduce
codesandbox
链接What is expected?
正常改变
locale
What is actually happening?
组件内部报错
。
The text was updated successfully, but these errors were encountered: