File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,10 @@ class QueueAnim extends React.Component {
148
148
}
149
149
150
150
performEnter ( key , i ) {
151
- const placeholderNode = findDOMNode ( this . refs [ placeholderKeyPrefix + key ] ) ;
151
+ /*
152
+ *占位符在暴击时是不存在的,所以用create
153
+ */
154
+ const placeholderNode = document . createElement ( 'div' ) ;
152
155
if ( ! placeholderNode ) {
153
156
return ;
154
157
}
@@ -169,7 +172,13 @@ class QueueAnim extends React.Component {
169
172
performEnterBegin ( key , i ) {
170
173
const childrenShow = this . state . childrenShow ;
171
174
childrenShow [ key ] = true ;
172
- this . setState ( { childrenShow} , this . realPerformEnter . bind ( this , key , i ) ) ;
175
+ /*
176
+ *这里会报错,用_reactInternalInstance来分别出这个组件还存在否,
177
+ * componentWillUnmount能去掉所有的setState吗?这里有延时处理...
178
+ */
179
+ if ( this . _reactInternalInstance ) {
180
+ this . setState ( { childrenShow} , this . realPerformEnter . bind ( this , key , i ) ) ;
181
+ }
173
182
}
174
183
175
184
realPerformEnter ( key , i ) {
You can’t perform that action at this time.
0 commit comments