generated from arvinxx/npm-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: 添加测试用例 * feat: 完全 clone 静态方法 * chore: 改进构建工具 * chore: update file * chore: update docs * chore: 软连接调试 * chore: update deps * chore: 修复测试 demo 失败
- Loading branch information
Showing
10 changed files
with
1,841 additions
and
711 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,6 @@ screenshot | |
example/.temp/* | ||
.eslintcache | ||
techUI* | ||
|
||
# Symbolic link | ||
examples/with-antd4/src/App.tsx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: 静态方法 | ||
group: | ||
title: Legacy | ||
order: 5 | ||
--- | ||
|
||
## 静态方法 | ||
|
||
自 antd 发布 5.0 版本后, Modal 的静态方法已经不推荐使用,[为什么?](https://ant.design/docs/blog/why-not-static-cn), 但二次封装不应该阉割先前的功能, 所以需要将 Modal 的静态方法保留了下来, 不推荐使用。 | ||
|
||
```tsx | ||
import { Button, Space } from 'antd'; | ||
import Modal from 'easy-antd-modal'; | ||
|
||
export default () => ( | ||
<Button | ||
danger | ||
onClick={() => { | ||
Modal.success({ | ||
title: 'success', | ||
content: ( | ||
<Space> | ||
不推荐使用!!! | ||
<Button type="link" href="https://ant.design/docs/blog/why-not-static-cn"> | ||
为什么? | ||
</Button> | ||
</Space> | ||
), | ||
onOk: () => console.log('success'), | ||
}); | ||
}} | ||
> | ||
Static Methods (Not Recommended) | ||
</Button> | ||
); | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.