fix: badge type error.

pull/11427/head
zongzi531 7 years ago committed by 偏右
parent 0f503b50f7
commit e29a88b704

@ -3,7 +3,7 @@ import { createElement, Component } from 'react';
import omit from 'omit.js';
import classNames from 'classnames';
function getNumberArray(num: string | number | undefined) {
function getNumberArray(num: string | number | undefined | null) {
return num ?
num.toString()
.split('')
@ -14,16 +14,16 @@ function getNumberArray(num: string | number | undefined) {
export interface ScrollNumberProps {
prefixCls?: string;
className?: string;
count?: string | number;
count?: string | number | null;
component?: string;
onAnimated?: Function;
style?: React.CSSProperties;
title?: string | number;
title?: string | number | null;
}
export interface ScrollNumberState {
animateStarted?: boolean;
count?: string | number;
count?: string | number | null;
}
export default class ScrollNumber extends Component<ScrollNumberProps, ScrollNumberState> {

@ -8,7 +8,7 @@ export { ScrollNumberProps } from './ScrollNumber';
export interface BadgeProps {
/** Number to show in badge */
count?: number | string;
count?: number | string | null;
showZero?: boolean;
/** Max count to show */
overflowCount?: number;

Loading…
Cancel
Save