umijs / umi

A framework in react community ✨
https://umijs.org
MIT License
15.3k stars 2.65k forks source link

使用UMI创建antdPro项目,setLocale('ru-RU',false),dva数据被清除了,导致页面报错 #6206

Closed Troynew closed 3 years ago

Troynew commented 3 years ago

setLocale('ru-RU',true)不会清空dva,但是页面刷新,不是想要的效果

Troynew commented 3 years ago

first:yarn create umi , second:select ant-design-pro and pro V4 and typescript and simple and antd4, third: yarn && start project fourth: chang the code in <SelectLang /> witch is setLocale( 'xxx',false); fifth: change lang ,then dva data will be clear

Troynew commented 3 years ago

找到原因了,因为有几份locale文件的内容是一样的,因为有的没有翻译,都用en-US复制过去,导致的