diff --git a/components/button/demo/multiple.md b/components/button/demo/multiple.md index 48681ee5e..31c533664 100644 --- a/components/button/demo/multiple.md +++ b/components/button/demo/multiple.md @@ -13,7 +13,7 @@ If you need several buttons, we recommend that you use 1 primary button + n seco
Primary secondary - + 1st item 2nd item diff --git a/components/radio/demo/basic.md b/components/radio/demo/basic.md new file mode 100644 index 000000000..7c75988d7 --- /dev/null +++ b/components/radio/demo/basic.md @@ -0,0 +1,15 @@ + +#### 基本 +最简单的用法。 + + + +#### Basic +The simplest use. + + +```html + +``` diff --git a/components/radio/demo/basic.vue b/components/radio/demo/basic.vue deleted file mode 100644 index 02c275f0c..000000000 --- a/components/radio/demo/basic.vue +++ /dev/null @@ -1,13 +0,0 @@ - - diff --git a/components/radio/demo/disabled.vue b/components/radio/demo/disabled.md similarity index 60% rename from components/radio/demo/disabled.vue rename to components/radio/demo/disabled.md index 25c099c59..e294fc2b3 100644 --- a/components/radio/demo/disabled.vue +++ b/components/radio/demo/disabled.md @@ -1,8 +1,19 @@ + +#### 不可用 +Radio 不可用。 + + + +#### disabled +Radio unavailable. + + +```html +``` diff --git a/components/radio/demo/index.vue b/components/radio/demo/index.vue index 286eaf116..7dab9bfbf 100644 --- a/components/radio/demo/index.vue +++ b/components/radio/demo/index.vue @@ -1,23 +1,3 @@ - diff --git a/components/radio/demo/radioButton.md b/components/radio/demo/radioButton.md new file mode 100644 index 000000000..f3917b84e --- /dev/null +++ b/components/radio/demo/radioButton.md @@ -0,0 +1,49 @@ + +#### 按钮样式 +按钮样式的单选组合。 + + + +#### radio style +The combination of radio button style. + + +```html + + +``` diff --git a/components/radio/demo/radioButton.vue b/components/radio/demo/radioButton.vue deleted file mode 100644 index 6b54f15a3..000000000 --- a/components/radio/demo/radioButton.vue +++ /dev/null @@ -1,42 +0,0 @@ - - diff --git a/components/radio/demo/radioGroup-more.md b/components/radio/demo/radioGroup-more.md new file mode 100644 index 000000000..d3c983d86 --- /dev/null +++ b/components/radio/demo/radioGroup-more.md @@ -0,0 +1,42 @@ + +#### RadioGroup 垂直 +垂直的 RadioGroup,配合更多输入框选项。 + + + +#### Vertical RadioGroup +Vertical RadioGroup, with more radios. + + +```html + + +``` diff --git a/components/radio/demo/radioGroup-more.vue b/components/radio/demo/radioGroup-more.vue deleted file mode 100644 index 6ade73275..000000000 --- a/components/radio/demo/radioGroup-more.vue +++ /dev/null @@ -1,35 +0,0 @@ - - diff --git a/components/radio/demo/radioGroup-options.vue b/components/radio/demo/radioGroup-options.md similarity index 65% rename from components/radio/demo/radioGroup-options.vue rename to components/radio/demo/radioGroup-options.md index 6d5f55f14..dc48341a8 100644 --- a/components/radio/demo/radioGroup-options.vue +++ b/components/radio/demo/radioGroup-options.md @@ -1,14 +1,24 @@ + +#### RadioGroup 组合 - 配置方式 +通过配置 `options` 参数来渲染单选框。 + + + +#### RadioGroup group - optional +Render radios by configuring `options`. + + +```html +``` diff --git a/components/radio/demo/radioGroup-with-name.md b/components/radio/demo/radioGroup-with-name.md new file mode 100644 index 000000000..a7decb0ac --- /dev/null +++ b/components/radio/demo/radioGroup-with-name.md @@ -0,0 +1,20 @@ + +#### 单选组合 - 配合 name 使用 +可以为 RadioGroup 配置 `name` 参数,为组合内的 input 元素赋予相同的 `name` 属性,使浏览器把 RadioGroup 下的 Radio 真正看作是一组(例如可以通过方向键始终**在同一组内**更改选项)。 + + + +#### RadioGroup with name +Passing the `name` property to all `input[type="radio"]` that are in the same RadioGroup. It is usually used to let the browser see your RadioGroup as a real "group" and keep the default behavior. For example, using left/right keyboard arrow to change your selection that in the same RadioGroup. + + +```html + +``` diff --git a/components/radio/demo/radioGroup-with-name.vue b/components/radio/demo/radioGroup-with-name.vue deleted file mode 100644 index ab272d8f7..000000000 --- a/components/radio/demo/radioGroup-with-name.vue +++ /dev/null @@ -1,17 +0,0 @@ - - diff --git a/components/radio/demo/radioGroup.md b/components/radio/demo/radioGroup.md new file mode 100644 index 000000000..09d8807d5 --- /dev/null +++ b/components/radio/demo/radioGroup.md @@ -0,0 +1,34 @@ + +#### 单选组合 +一组互斥的 Radio 配合使用。 + + + +#### Radio Group +A group of radio components. + + +```html + + +``` diff --git a/components/radio/demo/radioGroup.vue b/components/radio/demo/radioGroup.vue deleted file mode 100644 index 085211370..000000000 --- a/components/radio/demo/radioGroup.vue +++ /dev/null @@ -1,27 +0,0 @@ - - diff --git a/components/radio/demo/size.md b/components/radio/demo/size.md new file mode 100644 index 000000000..c9b6cdf67 --- /dev/null +++ b/components/radio/demo/size.md @@ -0,0 +1,40 @@ + +#### 单选组合 +一组互斥的 Radio 配合使用。 + + + +#### Radio Group +A group of radio components. + + +```html + +``` diff --git a/components/radio/demo/size.vue b/components/radio/demo/size.vue deleted file mode 100644 index d9c6b44c6..000000000 --- a/components/radio/demo/size.vue +++ /dev/null @@ -1,37 +0,0 @@ - - diff --git a/components/radio/index.en-US.md b/components/radio/index.en-US.md new file mode 100644 index 000000000..8232afdb5 --- /dev/null +++ b/components/radio/index.en-US.md @@ -0,0 +1,41 @@ + + +## API + +### Radio + +| Property | Description | Type | optional | Default | +| -------- | ----------- | ---- | -------- | ------- | +| autoFocus | get focus when component mounted | boolean | false | | +| checked | Specifies whether the radio is selected. | boolean | | false | +| defaultChecked | Specifies the initial state: whether or not the radio is selected. | boolean | | false | +| disabled | Disable radio | boolean | | false | +| value | According to value for comparison, to determine whether the selected | any | | none | + +### RadioGroup + +radio group,wrap a group of `Radio`。 + +| Property | Description | Type | optional | Default | +| -------- | ----------- | ---- | -------- | ------- | +| defaultValue | Default selected value | any | none | none | +| disabled | Disable all radio buttons | boolean | | false | +| name | The `name` property of all `input[type="radio"]` children | string | | none | +| options | set children optional | string\[] \| Array<{ label: string value: string disabled?: boolean }> | 无 | 无 | +| size | Size, only on radio style | string | `large` `default` `small` | `default` | +| value(v-model) | Used for setting the currently selected value. | any | none | none | + + +### RadioGroup Events +| Events Name | Description | Arguments | +| --- | --- | --- | +| change | The callback function that is triggered when the state changes. | Function(e:Event) | + +## Methods + +### Radio + +| Name | Description | +| ---- | ----------- | +| blur() | remove focus | +| focus() | get focus | diff --git a/components/radio/index.zh-CN.md b/components/radio/index.zh-CN.md new file mode 100644 index 000000000..802660b3a --- /dev/null +++ b/components/radio/index.zh-CN.md @@ -0,0 +1,39 @@ + + +## API + +### Radio + +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| autoFocus | 自动获取焦点 | boolean | false | +| checked | 指定当前是否选中 | boolean | false | +| defaultChecked | 初始是否选中 | boolean | false | +| value | 根据 value 进行比较,判断是否选中 | any | 无 | + +### RadioGroup + +单选框组合,用于包裹一组 `Radio`。 + +| 参数 | 说明 | 类型 | 默认值 | +| --- | --- | --- | --- | +| defaultValue | 默认选中的值 | any | 无 | +| name | RadioGroup 下所有 `input[type="radio"]` 的 `name` 属性 | string | 无 | +| options | 以配置形式设置子元素 | string\[] \| Array<{ label: string value: string disabled?: boolean }> | 无 | +| size | 大小,只对按钮样式生效 | `large` \| `default` \| `small` | `default` | +| value(v-model) | 用于设置当前选中的值 | any | 无 | + +### RadioGroup 事件 + +| 事件名称 | 说明 | 回调参数 | +| --- | --- | --- | +| change | 选项变化时的回调函数 | Function(e:Event) | + +## 方法 + +### Radio + +| 名称 | 描述 | +| --- | --- | +| blur() | 移除焦点 | +| focus() | 获取焦点 | diff --git a/components/select/index.jsx b/components/select/index.jsx index ace180d0d..0036f2230 100644 --- a/components/select/index.jsx +++ b/components/select/index.jsx @@ -27,6 +27,7 @@ const AbstractSelectProps = { ]), autoFocus: PropTypes.bool, backfill: PropTypes.bool, + showArrow: PropTypes.bool, } const Value = PropTypes.shape({ key: String, diff --git a/docs/vue/i18n.en-US.md b/docs/vue/i18n.en-US.md index e6e4e5f4d..ef258fb56 100644 --- a/docs/vue/i18n.en-US.md +++ b/docs/vue/i18n.en-US.md @@ -6,7 +6,7 @@ If you want to use other languages, you can follow the instructions below. ## LocaleProvider -vue-antd-ui provides a React Component [LocaleProvider](/ant-design/components/locale-provider) for configuring vue-antd-ui locale text globally. +vue-antd-ui provides a Vue Component [LocaleProvider](/ant-design/components/locale-provider) for configuring vue-antd-ui locale text globally. ````html