update badge number

This commit is contained in:
jljsj 2015-11-19 17:02:28 +08:00
parent a52567bee6
commit 57cde4ab18

View File

@ -31,11 +31,7 @@ class AntNumber extends React.Component {
}
let length = count.toString().length;
let childrenWap = [];
const a = childrenWap.length || 0;
if (length < a) {
childrenWap.splice(0, 1);
}
let i = a;//length - 1;
let i = 0;
while (i < length) {
const children = this.getNumberOnly(i);
childrenWap.unshift(children);
@ -50,7 +46,6 @@ class AntNumber extends React.Component {
return childrenWap;
}
updateChildren(props) {
if (typeof props.count === 'string') {
return this.setState({