From cb0a927273a6a30b1f0209ce5148aafdc4c1fd94 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sun, 9 Dec 2018 11:49:18 +0800 Subject: [PATCH] feat: update input-number --- components/input-number/index.en-US.md | 1 + components/input-number/index.jsx | 7 +++++++ components/input-number/index.zh-CN.md | 1 + 3 files changed, 9 insertions(+) diff --git a/components/input-number/index.en-US.md b/components/input-number/index.en-US.md index 3a3daa9c9..fd337b444 100644 --- a/components/input-number/index.en-US.md +++ b/components/input-number/index.en-US.md @@ -10,6 +10,7 @@ | min | min value | number | -Infinity | | parser | Specifies the value extracted from formatter | function( string): number | - | | precision | precision of input value | number | - | +| decimalSeparator | decimal separator | string | - | | size | width of input box | string | - | | step | The number to which the current value is increased or decreased. It can be an integer or decimal. | number\|string | 1 | | value(v-model) | current value | number | | diff --git a/components/input-number/index.jsx b/components/input-number/index.jsx index aab9dd5d8..a31c02db0 100644 --- a/components/input-number/index.jsx +++ b/components/input-number/index.jsx @@ -1,6 +1,7 @@ import PropTypes from '../_util/vue-types' import { initDefaultProps, getOptionProps } from '../_util/props-util' import classNames from 'classnames' +import Icon from '../icon' import VcInputNumber from '../vc-input-number/src' export const InputNumberProps = { @@ -21,6 +22,7 @@ export const InputNumberProps = { size: PropTypes.oneOf(['large', 'small', 'default']), formatter: PropTypes.func, parser: PropTypes.func, + decimalSeparator: PropTypes.string, placeholder: PropTypes.string, name: PropTypes.string, id: PropTypes.string, @@ -53,8 +55,13 @@ const InputNumber = { [`${this.prefixCls}-lg`]: size === 'large', [`${this.prefixCls}-sm`]: size === 'small', }) + const upIcon = + const downIcon = + const vcInputNumberprops = { props: { + upHandler: upIcon, + downHandler: downIcon, ...others, }, class: inputNumberClass, diff --git a/components/input-number/index.zh-CN.md b/components/input-number/index.zh-CN.md index 25c5949cb..6db9e8334 100644 --- a/components/input-number/index.zh-CN.md +++ b/components/input-number/index.zh-CN.md @@ -12,6 +12,7 @@ | min | 最小值 | number | -Infinity | | parser | 指定从 formatter 里转换回数字的方式,和 formatter 搭配使用 | function( string): number | - | | precision | 数值精度 | number | - | +| decimalSeparator | 小数点 | string | - | | size | 输入框大小 | string | 无 | | step | 每次改变步数,可以为小数 | number\|string | 1 | | value(v-model) | 当前值 | number | |