File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ export const TimePickerProps = () => ({
55
55
align : PropTypes . object ,
56
56
placement : PropTypes . any ,
57
57
transitionName : PropTypes . string ,
58
+ autoFocus : PropTypes . bool ,
59
+ addon : PropTypes . any ,
58
60
} )
59
61
60
62
export default {
@@ -146,6 +148,7 @@ export default {
146
148
class : className ,
147
149
ref : 'timePicker' ,
148
150
on : {
151
+ ...this . $listeners ,
149
152
change : this . handleChange ,
150
153
open : this . handleOpenClose ,
151
154
close : this . handleOpenClose ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function noop () {
12
12
13
13
export default {
14
14
mixins : [ BaseMixin ] ,
15
+ name : 'VcTimePicker' ,
15
16
props : initDefaultProps ( {
16
17
prefixCls : PropTypes . string ,
17
18
clearText : PropTypes . string ,
@@ -84,6 +85,13 @@ export default {
84
85
sValue : value ,
85
86
}
86
87
} ,
88
+ mounted ( ) {
89
+ this . $nextTick ( ( ) => {
90
+ if ( this . autoFocus ) {
91
+ this . focus ( )
92
+ }
93
+ } )
94
+ } ,
87
95
88
96
watch : {
89
97
value ( val ) {
You can’t perform that action at this time.
0 commit comments