diff --git a/build/config.js b/build/config.js index b7c8bff87..f1400f5b2 100644 --- a/build/config.js +++ b/build/config.js @@ -1,5 +1,5 @@ module.exports = { dev: { - componentName: 'progress', // dev components + componentName: 'radio', // dev components }, }; diff --git a/components/radio/Group.jsx b/components/radio/Group.jsx index f334af5cb..0f0815ceb 100644 --- a/components/radio/Group.jsx +++ b/components/radio/Group.jsx @@ -104,7 +104,7 @@ export default { if (typeof option === 'string') { return ( ConfigConsumerProps }, }, methods: { - handleChange(event) { - const targetChecked = event.target.checked; - this.$emit('input', targetChecked); - this.$emit('change', event); - }, focus() { this.$refs.vcCheckbox.focus(); }, blur() { this.$refs.vcCheckbox.blur(); }, + handleChange(event) { + const targetChecked = event.target.checked; + this.$emit('input', targetChecked); + this.$emit('change', event); + }, onChange(e) { this.$emit('change', e); if (this.radioGroupContext && this.radioGroupContext.onRadioChange) { diff --git a/components/radio/demo/radioGroup-with-name.md b/components/radio/demo/radioGroup-with-name.md index 4580ac7c5..7e24d09fc 100644 --- a/components/radio/demo/radioGroup-with-name.md +++ b/components/radio/demo/radioGroup-with-name.md @@ -1,11 +1,11 @@ #### 单选组合 - 配合 name 使用 -可以为 RadioGroup 配置 `name` 参数,为组合内的 input 元素赋予相同的 `name` 属性,使浏览器把 RadioGroup 下的 Radio 真正看作是一组(例如可以通过方向键始终**在同一组内**更改选项)。 +可以为 Radio.Group 配置 `name` 参数,为组合内的 input 元素赋予相同的 `name` 属性,使浏览器把 Radio.Group 下的 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. +#### Radio.Group with name +Passing the `name` property to all `input[type="radio"]` that are in the same Radio.Group. It is usually used to let the browser see your Radio.Group as a real "group" and keep the default behavior. For example, using left/right keyboard arrow to change your selection that in the same Radio.Group. ```tpl