Ant-design-pro: SelectLang改变语言,AvatarDropdown下拉内容没有变化,目前在预览网站也是如此

Created on 22 Aug 2019  ·  6Comments  ·  Source: ant-design/ant-design-pro

image

image

应该是个bug,但是检查AvatarDropdown , 里面用的FormattedMessage没问题 ?

Inactive 🛑 bug

Most helpful comment

AvatarDropdown 不在 context 中导致的。lang 改变会触发 context render

All 6 comments

image
可以使用reload解决 但是毕竟不是特别好

AvatarDropdown 不在 context 中导致的。lang 改变会触发 context render

image
可以使用reload解决 但是毕竟不是特别好


触发一下render就好了

@GanJiaJia 来个 pr?

试了一下
发现好像是dva的问题
dva connect 拿掉后 就正常了
因为自己的页面也遇到同样问题

升级 dva 到 beta,用新提供的 useSelector / useDispatch
可以解决问题

fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lvzheng0404 picture lvzheng0404  ·  3Comments

yadongxie150 picture yadongxie150  ·  3Comments

RichardStark picture RichardStark  ·  3Comments

2uncle-code picture 2uncle-code  ·  3Comments

Yoping picture Yoping  ·  3Comments