@@ -303,6 +303,7 @@ export default forwardRef((props: IProps, ref: any) => {
303
303
childrenShow . current = { ...$childShow } ;
304
304
setChildShow ( $childShow ) ;
305
305
} else {
306
+ // console.log(nextChildren, recordAnimKeys.current, keysToEnter.current, keysToLeave.current);
306
307
currentChildren . forEach ( ( c ) => {
307
308
if ( ! c ) {
308
309
return ;
@@ -315,6 +316,7 @@ export default forwardRef((props: IProps, ref: any) => {
315
316
delete placeholderTimeoutIds . current [ key ] ;
316
317
}
317
318
} ) ;
319
+
318
320
nextChildren . forEach ( ( c : any ) => {
319
321
if ( ! c ) {
320
322
return ;
@@ -325,7 +327,9 @@ export default forwardRef((props: IProps, ref: any) => {
325
327
// 如果 nextChildren 和当前的一致,且动画里是出场,改回进场;
326
328
if (
327
329
( ! hasPrev && key ) ||
328
- ( ( recordAnimKeys . current [ key ] === 'leave' || keysToEnter . current . indexOf ( key ) >= 0 ) &&
330
+ ( ( ! recordAnimKeys . current [ key ] ||
331
+ recordAnimKeys . current [ key ] === 'leave' ||
332
+ keysToEnter . current . indexOf ( key ) >= 0 ) &&
329
333
$keysToLeave . indexOf ( key ) === - 1 )
330
334
) {
331
335
$keysToEnter . push ( key ) ;
@@ -340,6 +344,7 @@ export default forwardRef((props: IProps, ref: any) => {
340
344
keysToLeave . current = $keysToLeave ;
341
345
recordKeysToLeave . current = [ ...$keysToLeave ] ;
342
346
347
+ // console.log($keysToEnter, $keysToLeave);
343
348
setChild ( newChildren ) ;
344
349
} , [ props . children ] ) ;
345
350
useLayoutEffect ( ( ) => {
0 commit comments