Skip to content

Commit aa5d6f9

Browse files
committed
update ant-design/issues/588
1 parent 954cff2 commit aa5d6f9

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/QueueAnim.jsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,10 @@ class QueueAnim extends React.Component {
148148
}
149149

150150
performEnter(key, i) {
151-
const placeholderNode = findDOMNode(this.refs[placeholderKeyPrefix + key]);
151+
/*
152+
*占位符在暴击时是不存在的,所以用create
153+
*/
154+
const placeholderNode = document.createElement('div');
152155
if (!placeholderNode) {
153156
return;
154157
}
@@ -169,7 +172,13 @@ class QueueAnim extends React.Component {
169172
performEnterBegin(key, i) {
170173
const childrenShow = this.state.childrenShow;
171174
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+
}
173182
}
174183

175184
realPerformEnter(key, i) {

0 commit comments

Comments
 (0)