pull/565/head
jljsj 9 years ago
parent f7176f31f4
commit 64be14e89e

@ -13,16 +13,16 @@ const ButtonGroup = Button.Group;
const Test = React.createClass({ const Test = React.createClass({
getInitialState() { getInitialState() {
return { return {
count: 227, count: 5,
show: true, show: true,
}; };
}, },
increase() { increase() {
const count = this.state.count + 13; const count = this.state.count + 1;
this.setState({ count }); this.setState({ count });
}, },
decline() { decline() {
let count = this.state.count - 71; let count = this.state.count - 1;
if (count < 0) { if (count < 0) {
count = 0; count = 0;
} }

@ -11,7 +11,7 @@ class AntBadge extends React.Component {
let { count, prefixCls } = this.props; let { count, prefixCls } = this.props;
const dot = this.props.dot; const dot = this.props.dot;
//count = count >= 100 ? '99+' : count; count = count >= 100 ? '99+' : count;
// dot mode don't need count // dot mode don't need count
if (dot) { if (dot) {
@ -31,7 +31,7 @@ class AntBadge extends React.Component {
transitionAppear={true}> transitionAppear={true}>
{ {
hidden ? null : hidden ? null :
<AntNumber data-show={!hidden} className={className} count={count} /> <AntNumber data-show={!hidden} className={className} count={count} max={99}/>
} }
</Animate> </Animate>
</span> </span>

Loading…
Cancel
Save