fix: rate `autoFocus` not work and `blur` error

pull/77/merge
tangjinzhou 2018-06-06 10:46:54 +08:00
parent 228f4478a5
commit c2c9841eb9
2 changed files with 6 additions and 5 deletions

View File

@ -13,6 +13,7 @@ export const RateProps = {
allowClear: PropTypes.bool,
disabled: PropTypes.bool,
character: PropTypes.any,
autoFocus: PropTypes.bool,
}
export default {

View File

@ -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({