diff --git a/components/rate/index.jsx b/components/rate/index.jsx index 7a4774616..365b01927 100644 --- a/components/rate/index.jsx +++ b/components/rate/index.jsx @@ -13,6 +13,7 @@ export const RateProps = { allowClear: PropTypes.bool, disabled: PropTypes.bool, character: PropTypes.any, + autoFocus: PropTypes.bool, } export default { diff --git a/components/vc-rate/src/Rate.jsx b/components/vc-rate/src/Rate.jsx index d749b937e..358ab63dc 100644 --- a/components/vc-rate/src/Rate.jsx +++ b/components/vc-rate/src/Rate.jsx @@ -149,11 +149,11 @@ export default { this.$refs.rateRef.focus() } }, - // blur () { - // if (!this.disabled) { - // this.$refs.rateRef.blur() - // } - // }, + blur () { + if (!this.disabled) { + this.$refs.rateRef.blur() + } + }, changeValue (value) { if (!hasProp(this, 'value')) { this.setState({