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 = () => ({
5555 align : PropTypes . object ,
5656 placement : PropTypes . any ,
5757 transitionName : PropTypes . string ,
58+ autoFocus : PropTypes . bool ,
59+ addon : PropTypes . any ,
5860} )
5961
6062export default {
@@ -146,6 +148,7 @@ export default {
146148 class : className ,
147149 ref : 'timePicker' ,
148150 on : {
151+ ...this . $listeners ,
149152 change : this . handleChange ,
150153 open : this . handleOpenClose ,
151154 close : this . handleOpenClose ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ function noop () {
1212
1313export default {
1414 mixins : [ BaseMixin ] ,
15+ name : 'VcTimePicker' ,
1516 props : initDefaultProps ( {
1617 prefixCls : PropTypes . string ,
1718 clearText : PropTypes . string ,
@@ -84,6 +85,13 @@ export default {
8485 sValue : value ,
8586 }
8687 } ,
88+ mounted ( ) {
89+ this . $nextTick ( ( ) => {
90+ if ( this . autoFocus ) {
91+ this . focus ( )
92+ }
93+ } )
94+ } ,
8795
8896 watch : {
8997 value ( val ) {
You can’t perform that action at this time.
0 commit comments