fix: time-picker focus blur autoFocus not work
parent
92c8a05a49
commit
d0d5552f50
|
@ -55,6 +55,8 @@ export const TimePickerProps = () => ({
|
|||
align: PropTypes.object,
|
||||
placement: PropTypes.any,
|
||||
transitionName: PropTypes.string,
|
||||
autoFocus: PropTypes.bool,
|
||||
addon: PropTypes.any,
|
||||
})
|
||||
|
||||
export default {
|
||||
|
@ -146,6 +148,7 @@ export default {
|
|||
class: className,
|
||||
ref: 'timePicker',
|
||||
on: {
|
||||
...this.$listeners,
|
||||
change: this.handleChange,
|
||||
open: this.handleOpenClose,
|
||||
close: this.handleOpenClose,
|
||||
|
|
|
@ -12,6 +12,7 @@ function noop () {
|
|||
|
||||
export default {
|
||||
mixins: [BaseMixin],
|
||||
name: 'VcTimePicker',
|
||||
props: initDefaultProps({
|
||||
prefixCls: PropTypes.string,
|
||||
clearText: PropTypes.string,
|
||||
|
@ -84,6 +85,13 @@ export default {
|
|||
sValue: value,
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.$nextTick(() => {
|
||||
if (this.autoFocus) {
|
||||
this.focus()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
watch: {
|
||||
value (val) {
|
||||
|
|
Loading…
Reference in New Issue