index.jsx 493 字节
Newer Older
U
ustccjw 已提交
1 2
import InputNumber from 'rc-input-number';
import React from 'react';
Y
yiminghe 已提交
3

U
ustccjw 已提交
4
export default React.createClass({
Y
yiminghe 已提交
5 6 7 8 9 10
  getDefaultProps() {
    return {
      prefixCls: 'ant-input-number'
    };
  },
  render() {
Z
zhujun24 已提交
11 12 13 14 15
    var sizeClass = '';
    if (this.props.size === 'large') {
      sizeClass = 'ant-input-number-lg';
    } else if (this.props.size === 'small') {
      sizeClass = 'ant-input-number-sm';
Z
zhujun24 已提交
16 17
    }
    return <InputNumber className={sizeClass} style={{width: 90}} {...this.props} />;
Y
yiminghe 已提交
18 19
  }
});