doc: add deprecated info (#37728)

This commit is contained in:
lijianan 2022-09-26 09:54:27 +08:00 committed by GitHub
parent b99a5100e0
commit c10e505e39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

View File

@ -139,6 +139,22 @@ export default {
export default App;
```
- BackTop components are removed in 5.0.0, and moved to FloatButton components, If you need to use, you can import it from the FloatButton components.
```diff
- import { BackTop } from 'antd';
+ import { FloatButton } from 'antd';
const App: React.FC = () => (
<div>
- <BackTop />
+ <FloatButton.BackTop />
</div>
);
export default App;
```
## Start upgrading
#### Migrate with codemod

View File

@ -140,6 +140,22 @@ export default {
export default App;
```
- BackTop 组件在 5.0.0 中移除,移至 FloatButton 悬浮按钮中,如需使用,可以从 FloatButton 中引入。
```diff
- import { BackTop } from 'antd';
+ import { FloatButton } from 'antd';
const App: React.FC = () => (
<div>
- <BackTop />
+ <FloatButton.BackTop />
</div>
);
export default App;
```
## 开始升级
#### 使用迁移工具修改