From 278b5d83e1cbeff87d71d3ae33fb1cd44128d4eb Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 15 Apr 2016 23:39:39 +0800 Subject: [PATCH] update docs --- components/input-number/demo/basic.md | 3 +-- components/input-number/demo/digit.md | 19 +++++++++++++++++++ components/input-number/index.md | 2 +- components/tree-select/index.md | 3 +-- 4 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 components/input-number/demo/digit.md diff --git a/components/input-number/demo/basic.md b/components/input-number/demo/basic.md index fbb7852b89..a33f1b3b0f 100644 --- a/components/input-number/demo/basic.md +++ b/components/input-number/demo/basic.md @@ -2,7 +2,7 @@ - order: 0 -数字输入框 +数字输入框。 --- @@ -17,4 +17,3 @@ ReactDOM.render( , mountNode); ```` - diff --git a/components/input-number/demo/digit.md b/components/input-number/demo/digit.md new file mode 100644 index 0000000000..0d72327a4b --- /dev/null +++ b/components/input-number/demo/digit.md @@ -0,0 +1,19 @@ +# 小数 + +- order: 3 + +和原生的数字输入框一样,value 的精度由 step 的小数位数决定。 + +--- + +````jsx +import { InputNumber } from 'antd'; + +function onChange(value) { + console.log('changed', value); +} + +ReactDOM.render( + +, mountNode); +```` diff --git a/components/input-number/index.md b/components/input-number/index.md index b50ff41380..f1815569f6 100644 --- a/components/input-number/index.md +++ b/components/input-number/index.md @@ -21,7 +21,7 @@ | min | 最小值 | Number | -Infinity | | max | 最大值 | Number | Infinity | | value | 当前值 | Number | | -| step | 每次改变步数 | Number or String | 1 | +| step | 每次改变步数,可以为小数 | Number or String | 1 | | defaultValue | 初始值 | Number | | | onChange | 变化回调 | Function | | | disabled | 禁用 | Boolean | false | diff --git a/components/tree-select/index.md b/components/tree-select/index.md index c79deeb870..227c2ac5bf 100644 --- a/components/tree-select/index.md +++ b/components/tree-select/index.md @@ -22,14 +22,13 @@ | defaultValue | 指定默认选中的条目 | string/Array | 无 | | multiple | 支持多选 | boolean | false | | onSelect | 被选中时调用,参数为选中项的 value 值 | function(value) | 无 | -| onChange | 选中option,或input的value变化(combobox 模式下)时,调用此函数 | function(value, label) | 无 | +| onChange | 选中项变化时调用此函数 | function(value, label) | 无 | | allowClear | 显示清除按钮 | boolean | false | | onSearch | 文本框值变化时回调 | function(value: String) | | | placeholder | 选择框默认文字 | string | 无 | | searchPlaceholder | 搜索框默认文字 | string | 无 | | dropdownStyle | 下拉菜单的样式 | object | 无 | | dropdownMatchSelectWidth | 下拉菜单和选择器同宽 | boolean | true | -| combobox | 输入框自动提示模式 | boolean | false | | size | 选择框大小,可选 `large` `small` | String | default | | showSearch | 在下拉中显示搜索框 | boolean | false | | disabled | 是否禁用 | boolean | false |