The ConfigProvider
component cannot dynamically change the language
#4225
Labels
ConfigProvider
component cannot dynamically change the language
#4225
看了一下组件源码,发现在监听
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: