File tree 2 files changed +12
-3
lines changed
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
- import { Component , triggerEvent , getValueFromProps } from '../_util/simply' ;
1
+ import mixinValue from '../mixins/value' ;
2
+ import { Component , getValueFromProps , triggerEvent } from '../_util/simply' ;
2
3
import { StepperDefaultProps } from './props' ;
3
4
import { getPrecision , getValidNumber } from './utils' ;
4
- import mixinValue from '../mixins/value' ;
5
5
6
6
Component (
7
7
StepperDefaultProps ,
@@ -11,7 +11,11 @@ Component(
11
11
triggerEvent ( this , 'focus' , value === '' ? null : Number ( value ) , e ) ;
12
12
} ,
13
13
onChange ( val , e ) {
14
- const { needUpdate, value } = this . update ( val ) ;
14
+ let curVal = val ;
15
+ /// #if WECHAT
16
+ curVal = val . detail ;
17
+ /// #endif
18
+ const { needUpdate, value } = this . update ( curVal ) ;
15
19
if ( getValueFromProps ( this , 'onChange' ) && needUpdate ) {
16
20
triggerEvent ( this , 'change' , value === '' ? null : Number ( value ) , e ) ;
17
21
}
Original file line number Diff line number Diff line change @@ -103,4 +103,9 @@ export const StepperDefaultProps: Partial<IStepperProps> = {
103
103
inputStyle : '' ,
104
104
disabled : false ,
105
105
inputReadOnly : false ,
106
+ onChange : null ,
107
+ onConfirm : null ,
108
+ onFocus : null ,
109
+ onBlur : null ,
110
+ onDisabledTap : null ,
106
111
} ;
You can’t perform that action at this time.
0 commit comments