pro-components: 🐛[BUG] Warning: [antd: ***] `overlay` is deprecated. Please use `menu` instead.

🐛 bug 描述

更新ant 4.24.0后,pro-components里的组件需要更新新的api。 Warning: [antd: Dropdown] overlay is deprecated. Please use menu instead. Warning: [antd: Breadcrumb.Item] overlay is deprecated. Please use menu instead.

🏞 期望结果

更新新版本antd的API

© 版本信息

  • antd 版本: 4.24.0
  • ProComponents 版本: 2.3.28

🚑 其他信息

image

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 7
  • Comments: 39 (5 by maintainers)

Most upvoted comments

For those who are having trouble using overlay, you may use the following:

export const items = [ { label: "View Profile", key: "view-profile", }, ];

const handleClick = (e) => { console.log(e.key); };

<Dropdown
        menu={{
          onClick: handleClick,
          items: items,
        }}
    
      >
        <a>
          <Space>
            <DownOutlined />
          </Space>
        </a>
 </Dropdown>

`

same error + 1 不更新就不要开发布会吹牛逼

same error antd ver5.0.2 react_devtools_backend.js:4026 Warning: [antd: Dropdown] overlay is deprecated. Please use menu instead.

same error +1 image

@PluLongzhu I think it’s umi’s bug; image