Add polyfill

This commit is contained in:
Wei Zhu 2018-06-13 10:57:34 +08:00 committed by 偏右
parent 4ac0277813
commit 1c2385de98
3 changed files with 9 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import * as ReactDOM from 'react-dom';
import Animate from 'rc-animate';
import classNames from 'classnames';
import omit from 'omit.js';
import { polyfill } from 'react-lifecycles-compat';
import Icon from '../icon';
import CheckableTag from './CheckableTag';
@ -28,7 +29,7 @@ export interface TagState {
visible: boolean;
}
export default class Tag extends React.Component<TagProps, TagState> {
class Tag extends React.Component<TagProps, TagState> {
static CheckableTag = CheckableTag;
static defaultProps = {
prefixCls: 'ant-tag',
@ -152,3 +153,7 @@ export default class Tag extends React.Component<TagProps, TagState> {
);
}
}
polyfill(Tag);
export default Tag;

View File

@ -80,6 +80,7 @@
"rc-upload": "~2.5.0",
"rc-util": "^4.0.4",
"react-lazy-load": "^3.0.12",
"react-lifecycles-compat": "^3.0.4",
"react-slick": "~0.23.1",
"shallowequal": "^1.0.1",
"warning": "~4.0.1"

View File

@ -102,3 +102,5 @@ declare module "lodash/uniqBy";
declare module 'intersperse';
declare module "raf";
declare module "react-lifecycles-compat";