From de0493d82bbdc7de5d9fc9e88548fcd29bd65ced Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Fri, 3 Nov 2017 15:02:26 +0800 Subject: [PATCH] docs: translate, ref: #8100 --- components/time-picker/index.en-US.md | 8 ++++---- components/time-picker/index.zh-CN.md | 4 ++++ package.json | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components/time-picker/index.en-US.md b/components/time-picker/index.en-US.md index b888d31898..6736fcae6a 100644 --- a/components/time-picker/index.en-US.md +++ b/components/time-picker/index.en-US.md @@ -24,8 +24,11 @@ import moment from 'moment'; | Property | Description | Type | Default | | -------- | ----------- | ---- | ------- | | addon | called from timepicker panel to render some addon to its bottom | function | - | +| allowEmpty | allow clearing text | boolean | true | | className | className of picker | string | '' | +| clearText | clear tooltip of icon | string | clear | | defaultOpenValue | to highlight values in panel when there is no selected value | [moment](http://momentjs.com/) | moment() | +| defaultOpenValue | default open panel value, used to set utcOffset,locale if value/defaultValue absent | [moment](http://momentjs.com/) | moment() | | defaultValue | to set default time | [moment](http://momentjs.com/) | - | | disabled | determine whether the TimePicker is disabled | boolean | false | | disabledHours | to specify the hours that cannot be selected | function() | - | @@ -37,13 +40,10 @@ import moment from 'moment'; | open | whether to popup panel | boolean | false | | placeholder | display when there's no value | string | "Select a time" | | popupClassName | className of panel | string | '' | +| popupClassName | time panel className | string | - | | use12Hours | display as 12 hours format, with default format `h:mm:ss a` | boolean | false | | value | to set time | [moment](http://momentjs.com/) | - | | onChange | a callback function, can be executed when the selected time is changing | function(time: moment, timeString: string): void | - | | onOpenChange | a callback function which will be called while panel opening/closing | (open: boolean): void | - | -| allowEmpty | allow clearing text | boolean | true | -| clearText | clear tooltip of icon | string | clear | -| defaultOpenValue | default open panel value, used to set utcOffset,locale if value/defaultValue absent | [moment](http://momentjs.com/) | moment() | -| popupClassName | time panel className | string | - | diff --git a/components/time-picker/index.zh-CN.md b/components/time-picker/index.zh-CN.md index c6ecc55856..c405afaf79 100644 --- a/components/time-picker/index.zh-CN.md +++ b/components/time-picker/index.zh-CN.md @@ -25,8 +25,11 @@ import moment from 'moment'; | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | addon | 选择框底部显示自定义的内容 | function | 无 | +| allowEmpty | 是否展示清除按钮 | boolean | true | | className | 选择器类名 | string | '' | +| clearText | 清除按钮的提示文案 | string | clear | | defaultOpenValue | 无选中值时,面板打开时高亮的值 | [moment](http://momentjs.com/) | moment() | +| defaultOpenValue | 当 defaultValue/value 不存在时,可以设置面板打开时默认选中的值 | [moment](http://momentjs.com/) | moment() | | defaultValue | 默认时间 | [moment](http://momentjs.com/) | 无 | | disabled | 禁用全部操作 | boolean | false | | disabledHours | 禁止选择部分小时选项 | function() | 无 | @@ -38,6 +41,7 @@ import moment from 'moment'; | open | 面板是否打开 | boolean | false | | placeholder | 没有值的时候显示的内容 | string | "请选择时间" | | popupClassName | 弹出层类名 | string | '' | +| popupClassName | 浮层的 className | string | - | | use12Hours | 使用 12 小时制,为 true 时 `format` 默认为 `h:mm:ss a` | boolean | false | | value | 当前时间 | [moment](http://momentjs.com/) | 无 | | onChange | 时间发生变化的回调 | function(time: moment, timeString: string): void | 无 | diff --git a/package.json b/package.json index ad5101dcbf..de78c363b8 100644 --- a/package.json +++ b/package.json @@ -167,6 +167,7 @@ "lint-fix": "npm run lint-fix:code && npm run lint-fix:demo", "lint-fix:code": "eslint --fix tests site scripts components ./.eslintrc.js ./webpack.config.js --ext '.js,.jsx'", "lint-fix:demo": "eslint-tinker ./components/*/demo/*.md", + "sort-api": "node ./scripts/sort-api-table.js", "dist": "antd-tools run dist", "compile": "antd-tools run compile", "tsc": "tsc",