Skip to content

Commit 4f03a83

Browse files
committed
fix: 修复 SwipeAction 组件初始化问题
1 parent 9b3c80d commit 4f03a83

File tree

1 file changed

+4
-0
lines changed
  • packages/taro-ui/src/components/swipe-action

1 file changed

+4
-0
lines changed

packages/taro-ui/src/components/swipe-action/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ export default class AtSwipeAction extends React.Component<
125125
this.moveX = e.detail.x
126126
}
127127

128+
componentDidMount(): void {
129+
this._reset(!!this.props.isOpened)
130+
}
131+
128132
public render(): JSX.Element {
129133
const { componentId, offsetSize } = this.state
130134
const { options } = this.props

0 commit comments

Comments
 (0)