umi
umi copied to clipboard
[Bug] plugin-locale langMenu 使用items而不是children
What happens?
Warning: [antd: Menu] children
will be removed in next major version. Please use items
instead.
问题在 https://github.com/umijs/umi/blob/master/packages/plugins/libs/locale/SelectLang.tpl 425行 需要将chidren修改为items 比如这样
<Menu selectedKeys={[selectedLang]} onClick={handleClick} items={
allLangUIConfig.map((localeObj) => {
return (
{
key:localeObj.lang || localeObj.key,
icon: localeObj?.icon || "🌐",
label: localeObj?.label || "en-US",
}
);
})
}>
</Menu>
Mini Showcase Repository(REQUIRED)
Please provide a minimal reproduction then upload to your GitHub. 请提供 最小重现,并上传到你的 GitHub 仓库
任意项目都可以,鼠标悬浮到翻译按钮上,控制台报错
Context
- Umi Version: 4.0.15
- Node Version:16.15.1
- Platform:windows 10
+1
最新版本已经改成 items
了。