File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -156,18 +156,17 @@ class QueueAnim extends React.Component {
156
156
) ;
157
157
158
158
const childrenShow = this . state . childrenShow ;
159
- if ( nextProps . enterForcedRePlay ) {
160
- // 在出场没结束时,childrenShow 里的值将不会清除。再触发进场时, childrenShow 里的值是保留着的, 设置了 enterForcedRePlay 将重新播放进场。
161
- newChildren . forEach ( item => {
162
- if ( this . keysToLeave . indexOf ( item . key ) >= 0 ) {
163
- const node = findDOMNode ( this . refs [ item . key ] ) ;
164
- // 因为进场是用的间隔性进入,这里不做 stop 处理将会在这间隔里继续出场的动画。。
165
- velocity ( node , 'stop' ) ;
166
- delete childrenShow [ item . key ] ;
167
- }
168
- } ) ;
169
- }
170
-
159
+ // 在出场没结束时,childrenShow 里的值将不会清除。再触发进场时, childrenShow 里的值是保留着的, 设置了 enterForcedRePlay 将重新播放进场。
160
+ this . keysToLeave . forEach ( key => {
161
+ // 将所有在出场里的停止掉。避免间隔性出现
162
+ // 因为进场是用的间隔性进入,这里不做 stop 处理将会在这间隔里继续出场的动画。。
163
+ const node = findDOMNode ( this . refs [ key ] ) ;
164
+ velocity ( node , 'stop' ) ;
165
+ if ( nextProps . enterForcedRePlay ) {
166
+ // 清掉所有出场的。
167
+ delete childrenShow [ key ] ;
168
+ }
169
+ } ) ;
171
170
172
171
this . keysToEnter = [ ] ;
173
172
this . keysToLeave = [ ] ;
You can’t perform that action at this time.
0 commit comments