File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/taro-ui/src/components/swipe-action Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,9 @@ export default class AtSwipeAction extends React.Component<
41
41
const { _isOpened } = this . state
42
42
43
43
if ( isOpened !== _isOpened ) {
44
- this . _reset ( ! ! isOpened ) // TODO: Check behavior
44
+ const isOpened = ! ! this . props . isOpened
45
+ this . moveX = isOpened ? 0 : this . maxOffsetSize
46
+ this . _reset ( isOpened ) // TODO: Check behavior
45
47
}
46
48
}
47
49
@@ -126,7 +128,9 @@ export default class AtSwipeAction extends React.Component<
126
128
}
127
129
128
130
componentDidMount ( ) : void {
129
- this . _reset ( ! ! this . props . isOpened )
131
+ const isOpened = ! ! this . props . isOpened
132
+ this . moveX = isOpened ? 0 : this . maxOffsetSize
133
+ this . _reset ( isOpened )
130
134
}
131
135
132
136
public render ( ) : JSX . Element {
You can’t perform that action at this time.
0 commit comments