Skip to content

Commit

Permalink
init: fix components docs
Browse files Browse the repository at this point in the history
  • Loading branch information
warmhug committed Jun 5, 2018
1 parent 236faf8 commit 71147f0
Show file tree
Hide file tree
Showing 82 changed files with 91 additions and 558 deletions.
4 changes: 0 additions & 4 deletions components/accordion/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ You can collapse / expand the content area.

### Accordion

Support WEB, React-Native.

Properties | Descrition | Type | Default
-----------|------------|------|--------
| activeKey | current active Panel key | Array or String | The first panel key on accordion mode|
| defaultActiveKey | default active key | String | null |
| onChange | called when collapse Panel is changed | (key: string): void | noop |
| accordion (`web only`) | accordion mode | Boolean | false |
| openAnimation (`web only`) | set the custom switch animation, disable the animation can be set to `{}` | Object | ref `rc-collapse/lib/openAnimationFactory.js` |

### Accordion.Panel

Expand Down
4 changes: 0 additions & 4 deletions components/accordion/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@ subtitle: 手风琴

### Accordion

适用平台:WEB、React-Native

属性 | 说明 | 类型 | 默认值
----|-----|------|------
| activeKey | 当前激活 tab 面板的 key| Array or String | 默认无,accordion模式下默认第一个元素|
| defaultActiveKey | 初始化选中面板的 key | String ||
| onChange | 切换面板的回调 | (key: string): void | noop |
| accordion (`web only`) | `手风琴`模式 | Boolean | false |
| openAnimation (`web only`) | 设置自定义切换动画,禁止动画可设为`{}` | Object | 参考 rc-collapse/lib/openAnimationFactory.js 文件 |

### Accordion.Panel

Expand Down
18 changes: 0 additions & 18 deletions components/action-sheet/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ The modal box pops up from the bottom, providing more than two actions related t

## API

Support WEB, React-Native.

#### static showActionSheetWithOptions(options: Object, callback: Function)

Display a action sheet. The `options` object must contain one or more of:
Expand All @@ -26,22 +24,6 @@ Display a action sheet. The `options` object must contain one or more of:
- destructiveButtonIndex (int) - index of destructive button in `options`
- title (string) - a title to show above the action sheet
- message (string/React.element) - a message to show below the title
- maskClosable (bool)(`web only`) - Whether it's allowed to close when you click the mask (default true)

The `callback` function support returns Promise (`web only`)

#### static showShareActionSheetWithOptions(options: Object, callback: Function)

Display shareable action sheet. The `options` object must contain one or more of:

- options (array of `{icon: ReactNode, title: string}`) - a list of share buttons (required)
- It can be a two-dimensional array, can display multi-line buttons, e.g. `[[{icon,title},...],...]` means two rows and two columns. In this case there are two parameters on `callback`, the first for the `column` sequence, the second for the `line`.
- cancelButtonText (string)(`web only`) - the text of cancel button, default `取消`
- title (string) - a title to show above the action sheet
- message (string/React.element) - a message to show below the title
- maskClosable (bool)(`web only`) - Whether it's allowed to close when you click the mask (default true)

The `callback` function support returns Promise (`web only`)

#### static showShareActionSheetWithOptions(options: Object, failureCallback: Function, successCallback: Function)

Expand Down
18 changes: 0 additions & 18 deletions components/action-sheet/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ subtitle: 动作面板

## API

适用平台:WEB、React-Native

#### static showActionSheetWithOptions(options: Object, callback: Function)

显示 action sheet,`options`对象必须包含以下的一个或者多个:
Expand All @@ -27,22 +25,6 @@ subtitle: 动作面板
- destructiveButtonIndex (int) - 按钮列表中破坏性按钮(一般为删除)的索引位置
- title (string) - 顶部标题
- message (string/React.element) - 顶部标题下的简要消息
- maskClosable (bool)(`web only`) - 点击蒙层是否允许关闭,默认允许

`callback`函数支持返回 Promise (`web only`)

#### static showShareActionSheetWithOptions(options: Object, callback: Function) `WEB only`

显示分享 action sheet,`options`对象必须包含以下的一个或者多个:

- options (array of `{icon: ReactNode, title: string}`) - 分享按钮列表 (required)
- 可以是二维数组,能显示多行按钮,例如`[[{icon,title},...],...]`表示两行两列。当为二维数组时`callback`有两个参数,第一个为``序列、第二个为``序列。
- cancelButtonText (string)(`web only`) - 取消按钮文案,默认为`取消`
- title (string) - 顶部标题
- message (string/React.element) - 顶部标题下的简要消息
- maskClosable (bool)(`web only`) - 点击蒙层是否允许关闭,默认允许

`callback`函数支持返回 Promise (`web only`)

#### static showShareActionSheetWithOptions(options: Object, failureCallback: Function, successCallback: Function)

Expand Down
4 changes: 1 addition & 3 deletions components/activity-indicator/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ title: ActivityIndicator

## API

Support WEB, React-Native.

```jsx
<ActivityIndicator />
<ActivityIndicator color="white" />
Expand All @@ -33,4 +31,4 @@ Properties | Descrition | Type | Default
| size | Size of the indicator (`small`/`large`) | string | small |
| toast | Whether to use toast style | boolean | false |
| text | loading text behind the indicator | string | - |
| color (`RN only`) | The foreground color of the spinner (default is gray). | string | gray |
| color | The foreground color of the spinner (default is gray). | string | gray |
4 changes: 1 addition & 3 deletions components/activity-indicator/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ subtitle: 活动指示器

## API

适用平台:WEB、React-Native

```jsx
<ActivityIndicator />
<ActivityIndicator color="white" />
Expand All @@ -35,4 +33,4 @@ subtitle: 活动指示器
| size | spinner大小,可选`small`/`large` | string | small |
| toast | loading样式类型 | boolean | false |
| text | loading文本 | string | - |
| color (`RN only`) | spinner颜色 | string | gray |
| color | spinner颜色 | string | gray |
3 changes: 0 additions & 3 deletions components/badge/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ The red dot at corner for notification and getting user attention.

## API

Support WEB, React-Native.

Properties | Descrition | Type | Default
-----------|------------|------|--------
size | size of badge, optional: `large` `small` | string | `small`
text | text or number inside badge | string\|number | -
corner | whether is badge at corner position | boolean | `false`
dot | show badge as a red dot | boolean | `false`
overflowCount | max count to show | number | `99`
hot `WEB only` | hot commercial style | boolean | `false`
3 changes: 0 additions & 3 deletions components/badge/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@ subtitle: 徽标数

## API

适用平台:WEB、React-Native。

属性 | 说明 | 类型 | 默认值
----|-----|------|------
size | 大小,可选 `large` `small` | string | `small`
text | 展示的数字或文案,当为数字时候,大于 overflowCount <br/> 时显示为 ${overflowCount}+,为 0 时隐藏 | string\|number | -
corner | 置于角落 | boolean | `false`
dot | 不展示数字,只有一个小红点 | boolean | `false`
overflowCount | 展示封顶的数字值 | number | `99`
hot `WEB only` | 营销样式 | boolean | `false`
15 changes: 4 additions & 11 deletions components/button/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ To trigger an operation.

## API

Support WEB, React-Native.

Properties | Descrition | Type | Default
-----------|------------|------|--------
| type | can be set to `primary`/`ghost`/`warning` or omitted | string | - |
Expand All @@ -20,12 +18,7 @@ Properties | Descrition | Type | Default
| disabled | set disabled | boolean | false |
| onClick | set the handler to handle `click` event | (e: Object): void | - |
| style | custom style | Object | - |
| inline (`WEB only`) | whether set as an inline button | boolean | false |
| loading (`WEB only`) | whether set loading state | boolean | false |
| icon (`WEB only`) | can be set to one type value of the [Icon Component](https://mobile.ant.design/components/icon) or any valid React.Element. (Note: It will be overwritten by the `loading` setting) | `string`/`React.Element` | - |
| prefixCls (`WEB only`) | prefix class | string | `am-button` |
| className (`WEB only`) | class name | string | '' |
| onPressIn (`RN only`) | same as RN TouchableHighlight onPressIn | (e: Object): void | - |
| onPressOut (`RN only`) | same as RN TouchableHighlight onPressOut | (e: Object): void | - |
| onShowUnderlay (`RN only`) | same as RN TouchableHighlight onShowUnderlay | (e: Object): void | - |
| onHideUnderlay (`RN only`) | same as RN TouchableHighlight onHideUnderlay | (e: Object): void | - |
| onPressIn | same as RN TouchableHighlight onPressIn | (e: Object): void | - |
| onPressOut | same as RN TouchableHighlight onPressOut | (e: Object): void | - |
| onShowUnderlay | same as RN TouchableHighlight onShowUnderlay | (e: Object): void | - |
| onHideUnderlay | same as RN TouchableHighlight onHideUnderlay | (e: Object): void | - |
15 changes: 4 additions & 11 deletions components/button/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ subtitle: 按钮

## API

适用平台:WEB、React-Native

属性 | 说明 | 类型 | 默认值
----|-----|------|------
| type | 按钮类型,可选值为`primary`/`ghost`/`warning`或者不设 | string | - |
Expand All @@ -21,12 +19,7 @@ subtitle: 按钮
| disabled | 设置禁用 | boolean | false |
| onClick | 点击按钮的点击回调函数 | (e: Object): void ||
| style | 自定义样式 | Object ||
| inline (`WEB only`) | 是否设置为行内按钮 | boolean | false |
| loading (`WEB only`) | 设置按钮载入状态 | boolean | false |
| icon (`WEB only`) | 可以是 [Icon](https://mobile.ant.design/components/icon) 组件里内置的某个 icon 的 type 值,也可以是任意合法的 ReactElement (注意: `loading`设置后此项设置失效) | `string`/`React.Element` | - |
| prefixCls (`WEB only`) | class前缀 | string | `am-button` |
| className (`WEB only`) | 样式类名 | string ||
| onPressIn (`RN only`) | 同 RN TouchableHighlight onPressIn | (e: Object): void ||
| onPressOut (`RN only`) | 同 RN TouchableHighlight onPressOut | (e: Object): void ||
| onShowUnderlay (`RN only`) | 同 RN TouchableHighlight onShowUnderlay | (e: Object): void ||
| onHideUnderlay (`RN only`) | 同 RN TouchableHighlight onHideUnderlay | (e: Object): void ||
| onPressIn | 同 RN TouchableHighlight onPressIn | (e: Object): void ||
| onPressOut | 同 RN TouchableHighlight onPressOut | (e: Object): void ||
| onShowUnderlay | 同 RN TouchableHighlight onShowUnderlay | (e: Object): void ||
| onHideUnderlay | 同 RN TouchableHighlight onHideUnderlay | (e: Object): void ||
2 changes: 0 additions & 2 deletions components/card/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ Card can be used to organize information and operations, usually also as an entr

## API

Support WEB, React-Native.

### Card

Properties | Descrition | Type | Default
Expand Down
3 changes: 0 additions & 3 deletions components/card/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ title: Card
subtitle: 卡片
---


用于组织信息和操作,通常也作为详细信息的入口。

### 规则
Expand All @@ -14,8 +13,6 @@ subtitle: 卡片

## API

适用平台:WEB、React-Native

### Card

属性 | 说明 | 类型 | 默认值
Expand Down
14 changes: 3 additions & 11 deletions components/carousel/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ title: Carousel

## API

Support WEB, React-Native.

Properties | Descrition | Type | Default
-----------|------------|------|--------
| selectedIndex | current selected index | number | 0 |
Expand All @@ -19,12 +17,6 @@ Properties | Descrition | Type | Default
| afterChange | callback to be called after a slide is changed | (current: number): void | |
| dotStyle | style of dots | Object | |
| dotActiveStyle | style of active dot | Object | |
| frameOverflow (`web only`) | Used to set overflow style property on slider frame. | string | `hidden` |
| cellSpacing (`web only`) | Space between slides, as an integer, but reflected as `px` | number | - |
| slideWidth (`web only`) | Manually set slideWidth. If you want hard pixel widths, use a string like `slideWidth="20px"`, and if you prefer a percentage of the container, use a decimal integer like `slideWidth={0.8}` | string / number | - |
| easing (`web only`) | Animation easing function, see valid easings [here](https://github.com/chenglou/tween-functions) | Function | easeOutCirc |
| swipeSpeed (`web only`) | configure the swipe sensitivity | number | 12 |
| beforeChange (`web only`) | callback to be called before a slide is changed | (from: number, to: number): void | |
| onScrollBeginDrag (`rn only`) | as same as react-native scrollView `onScrollBeginDrag` | (): void | - |
| bounces (`rn only`) | as same as react-native scrollView `bounces` | Boolean | true |
| pagination (`rn only`) | A generator function which could be used to customized pagination. | (props) => React.ReactNode | |
| onScrollBeginDrag | as same as react-native scrollView `onScrollBeginDrag` | (): void | - |
| bounces | as same as react-native scrollView `bounces` | Boolean | true |
| pagination | A generator function which could be used to customized pagination. | (props) => React.ReactNode | |
14 changes: 3 additions & 11 deletions components/carousel/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ subtitle: 走马灯

## API

适用平台:WEB、React-Native

属性 | 说明 | 类型 | 默认值
----|-----|------|------
| selectedIndex | 手动设置当前显示的索引 | number | 0 |
Expand All @@ -22,12 +20,6 @@ subtitle: 走马灯
| afterChange | 切换面板后的回调函数 | (current: number): void ||
| dotStyle | 指示点样式 | Object ||
| dotActiveStyle | 当前激活的指示点样式 | Object ||
| frameOverflow (`web only`) | 设置 slider frame 的 overflow 样式 | string | `hidden` |
| cellSpacing (`web only`) | 项目之间的间距,以`px`为单位 | number | - |
| slideWidth (`web only`) | 手动设置项目宽度. 可以是`slideWidth="20px"`,也可以是相对容器的百分比`slideWidth={0.8}` | string / number | - |
| easing (`web only`) | 缓动函数,你可以使用[这里](https://github.com/chenglou/tween-functions)提供的其他函数 | Function | easeOutCirc |
| swipeSpeed (`web only`) | 滑动灵敏度 | number | 12 |
| beforeChange (`web only`) | 切换面板前的回调函数 | (from: number, to: number): void ||
| onScrollBeginDrag (`rn only`) | 见 react-native scrollView onScrollBeginDrag | (): void ||
| bounces (`rn only`) | 见 react-native scrollView bounces | Boolean | true |
| pagination (`rn only`) | 自定义 pagination | (props) => React.ReactNode | |
| onScrollBeginDrag | 见 react-native scrollView onScrollBeginDrag | (): void ||
| bounces | 见 react-native scrollView bounces | Boolean | true |
| pagination | 自定义 pagination | (props) => React.ReactNode | |
2 changes: 0 additions & 2 deletions components/checkbox/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Checkbox

## API

Support WEB, React-Native.

### Checkbox

Properties | Descrition | Type | Default
Expand Down
2 changes: 0 additions & 2 deletions components/checkbox/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ subtitle: 复选框

## API

适用平台:WEB、React-Native

### Checkbox

属性 | 说明 | 类型 | 默认值
Expand Down
3 changes: 0 additions & 3 deletions components/date-picker-view/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ DatePickerView's functions like DatePicker, but it is rendered directly in the a

## API

Support WEB, React-Native.

Properties | Descrition | Type | Default
-----------|------------|------|--------
| mode | mode value, can be a `date` or `time` or `datetime` or `year` or `month` | String | `date` |
| value | the currently selected value | Date | - |
| minDate | minimum date | Date | 2000-1-1 |
| maxDate | maximum date | Date | 2030-1-1 |
| use12Hours (`WEB only`) | 12 hours display mode | Boolean | false |
| minuteStep | The amount of time, in minutes, between each minute item. | Number | 1 |
| locale | international, can override the configuration of the global `[LocaleProvider](https://mobile.ant.design/components/locale-provider)` | Object: {DatePickerLocale: {year, month, day, hour, minute, am?, pm?}, okText, dismissText} | - |
| disabled | 是否不可用 | Boolean | false |
Expand Down
3 changes: 0 additions & 3 deletions components/date-picker-view/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ DatePickerView 的功能类似于 DatePicker ,但它是直接渲染在区域

## API

适用平台:WEB, React-Native

属性 | 说明 | 类型 | 默认值
----|-----|------|------
| mode | 日期选择的类型, 可以是日期`date`,时间`time`,日期+时间`datetime`,年`year`,月`month` | String | `date` |
| value | 当前选中时间 | Date ||
| minDate | 最小可选日期 | Date | 2000-1-1 |
| maxDate | 最大可选日期 | Date | 2030-1-1 |
| use12Hours (`WEB only`) | 12小时制 | Boolean | false |
| minuteStep | 分钟数递增步长设置 | Number | 1 |
| locale | 国际化,可覆盖全局`[LocaleProvider](https://mobile.ant.design/components/locale-provider)`的配置 | Object: {DatePickerLocale: {year, month, day, hour, minute, am?, pm?}, okText, dismissText } | - |
| disabled | 是否不可用 | Boolean | false |
Expand Down
5 changes: 0 additions & 5 deletions components/date-picker/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,12 @@ Used to select a date or time.

## API

Support WEB, React-Native.

Properties | Descrition | Type | Default
-----------|------------|------|--------
| mode | mode value, can be a `date` or `time` or `datetime` or `year` or `month` | String | `date` |
| value | the currently selected value | Date | - |
| minDate | minimum date | Date | 2000-1-1 |
| maxDate | maximum date | Date | 2030-1-1 |
| use12Hours (`WEB only`) | 12 hours display mode | Boolean | false |
| minuteStep | The amount of time, in minutes, between each minute item. | Number | 1 |
| locale | international, can override the configuration of the global `[LocaleProvider](https://mobile.ant.design/components/locale-provider)` | Object: {DatePickerLocale: {year, month, day, hour, minute, am?, pm?}, okText, dismissText} | - |
| disabled | set disabled | Boolean | false |
Expand All @@ -29,8 +26,6 @@ Properties | Descrition | Type | Default
| format | format the selected value | `(value: Date) => date string` / `format string`(corresponding mode under the format are: `YYYY-MM-DD` or `HH:mm` or `YYYY-MM-DD HH:mm`) | - |
| title | title | string/React.ReactElement | - |
| extra | the display text | String | `请选择` |
| prefixCls (`WEB only`) | prefix class | string | `am-picker` |
| className (`WEB only`) | className | string | - |
| onOk | handler called when click ok | (val): void | - |
| onDismiss | handler called when click cancel | (): void | - |

Expand Down
5 changes: 0 additions & 5 deletions components/date-picker/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@ subtitle: 日期选择

## API

适用平台:WEB, React-Native

属性 | 说明 | 类型 | 默认值
----|-----|------|------
| mode | 日期选择的类型, 可以是日期`date`,时间`time`,日期+时间`datetime`,年`year`,月`month` | String | `date` |
| value | 当前选中时间 | Date ||
| minDate | 最小可选日期 | Date | 2000-1-1 |
| maxDate | 最大可选日期 | Date | 2030-1-1 |
| use12Hours (`WEB only`) | 12小时制 | Boolean | false |
| minuteStep | 分钟数递增步长设置 | Number | 1 |
| locale | 国际化,可覆盖全局`[LocaleProvider](https://mobile.ant.design/components/locale-provider)`的配置 | Object: {DatePickerLocale: {year, month, day, hour, minute, am?, pm?}, okText, dismissText } | - |
| disabled | 是否不可用 | Boolean | false |
Expand All @@ -30,8 +27,6 @@ subtitle: 日期选择
| format | 格式化选中的值 | `(value: Date) => date string` / `format string`(对应 mode 下格式分别为:`YYYY-MM-DD`,`HH:mm`,`YYYY-MM-DD HH:mm`) | - |
| title | 弹框的标题 | string/React.ReactElement ||
| extra | 显示文案 | String | `请选择` |
| prefixCls (`WEB only`) | class前缀 | string | `am-picker` |
| className (`WEB only`) | 样式类名 | string | - |
| onOk | 点击选中时执行的回调 | (val): void ||
| onDismiss | 点击取消时执行的回调 | (): void ||

Expand Down
Loading

0 comments on commit 71147f0

Please sign in to comment.