🗑️ remove Tag afterClose from docs (#24779)

This commit is contained in:
偏右 2020-06-06 14:14:30 +08:00 committed by GitHub
parent e09ce6284e
commit 584f9fd907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 15 deletions

View File

@ -100,19 +100,6 @@ describe('Tag', () => {
}); });
}); });
it('props#afterClose do not warn anymore', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
const afterClose = jest.fn();
const wrapper = mount(<Tag closable afterClose={afterClose} />);
expect(errorSpy.mock.calls.length).toBe(1);
expect(errorSpy.mock.calls[0][0].includes('React does not recognize')).toBeTruthy();
wrapper.find('.anticon-close').simulate('click');
expect(afterClose).not.toHaveBeenCalled();
});
describe('CheckableTag', () => { describe('CheckableTag', () => {
it('support onChange', () => { it('support onChange', () => {
const onChange = jest.fn(); const onChange = jest.fn();

View File

@ -19,7 +19,6 @@ Tag for categorizing or markup.
| Property | Description | Type | Default | | Property | Description | Type | Default |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| afterClose | Callback executed when close animation is completed, please use `onClose`, we will remove this in the next version | () => void | - |
| closable | Whether the Tag can be closed | boolean | `false` | | closable | Whether the Tag can be closed | boolean | `false` |
| color | Color of the Tag | string | - | | color | Color of the Tag | string | - |
| onClose | Callback executed when tag is closed | (e) => void | - | | onClose | Callback executed when tag is closed | (e) => void | - |

View File

@ -19,7 +19,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/cH1BOLfxC/Tag.svg
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- | | --- | --- | --- | --- |
| afterClose | 关闭动画完成后的回调,请使用 `onClose`, 我们将在下个版本删除此项 | () => void | - |
| closable | 标签是否可以关闭 | boolean | false | | closable | 标签是否可以关闭 | boolean | false |
| color | 标签色 | string | - | | color | 标签色 | string | - |
| onClose | 关闭时的回调 | (e) => void | - | | onClose | 关闭时的回调 | (e) => void | - |