mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
doc: add deprecated info (#37728)
This commit is contained in:
parent
b99a5100e0
commit
c10e505e39
@ -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
|
||||
|
@ -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;
|
||||
```
|
||||
|
||||
## 开始升级
|
||||
|
||||
#### 使用迁移工具修改
|
||||
|
Loading…
Reference in New Issue
Block a user