File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
packages/taro-ui/src/components/swipe-action Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ import {
13
13
import {
14
14
delayGetClientRect ,
15
15
delayGetScrollOffset ,
16
- isTest ,
17
16
uuid
18
17
} from '../../common/utils'
19
18
import AtSwipeActionOptions from './options/index'
@@ -49,7 +48,7 @@ export default class AtSwipeAction extends React.Component<
49
48
this . isMoving = false
50
49
this . isTouching = false
51
50
this . state = {
52
- componentId : isTest ( ) ? 'tabs-AOTU2018' : uuid ( ) ,
51
+ componentId : uuid ( ) ,
53
52
offsetSize : 0 ,
54
53
_isOpened : ! ! isOpened
55
54
}
@@ -105,14 +104,14 @@ export default class AtSwipeAction extends React.Component<
105
104
106
105
private handleOpened = ( event : CommonEvent ) : void => {
107
106
const { onOpened } = this . props
108
- if ( typeof onOpened === 'function' && ! this . state . _isOpened ) {
107
+ if ( typeof onOpened === 'function' && this . state . _isOpened ) {
109
108
onOpened ( event )
110
109
}
111
110
}
112
111
113
112
private handleClosed = ( event : CommonEvent ) : void => {
114
113
const { onClosed } = this . props
115
- if ( typeof onClosed === 'function' && this . state . _isOpened ) {
114
+ if ( typeof onClosed === 'function' && ! this . state . _isOpened ) {
116
115
onClosed ( event )
117
116
}
118
117
}
@@ -241,7 +240,7 @@ export default class AtSwipeAction extends React.Component<
241
240
< View
242
241
key = { `${ item . text } -${ key } ` }
243
242
style = { item . style }
244
- onClick = { e => this . handleClick ( item , key , e ) }
243
+ onClick = { ( e ) : void => this . handleClick ( item , key , e ) }
245
244
className = { classNames (
246
245
'at-swipe-action__option' ,
247
246
item . className
You can’t perform that action at this time.
0 commit comments