diff --git a/components/tag/__tests__/index.test.js b/components/tag/__tests__/index.test.js index fa04c69c6d..353aed4607 100644 --- a/components/tag/__tests__/index.test.js +++ b/components/tag/__tests__/index.test.js @@ -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(); - - 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', () => { it('support onChange', () => { const onChange = jest.fn(); diff --git a/components/tag/index.en-US.md b/components/tag/index.en-US.md index bc018d88a3..56b321c205 100644 --- a/components/tag/index.en-US.md +++ b/components/tag/index.en-US.md @@ -19,7 +19,6 @@ Tag for categorizing or markup. | 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` | | color | Color of the Tag | string | - | | onClose | Callback executed when tag is closed | (e) => void | - | diff --git a/components/tag/index.zh-CN.md b/components/tag/index.zh-CN.md index 379e1710c4..187dd7a7b1 100644 --- a/components/tag/index.zh-CN.md +++ b/components/tag/index.zh-CN.md @@ -19,7 +19,6 @@ cover: https://gw.alipayobjects.com/zos/alicdn/cH1BOLfxC/Tag.svg | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | -| afterClose | 关闭动画完成后的回调,请使用 `onClose`, 我们将在下个版本删除此项 | () => void | - | | closable | 标签是否可以关闭 | boolean | false | | color | 标签色 | string | - | | onClose | 关闭时的回调 | (e) => void | - |