Commit a3eb0863 authored by rockyl's avatar rockyl

修复批量关闭弹窗的问

parent ce32f4ac
......@@ -191,10 +191,15 @@ export class StackContainer extends Node {
return new Promise(resolve => {
const action = 'popAll';
let lastView = this.getChildAt(0);
let len = this.childNum;
while (this.children.length > 1) {
this.removeChildAt(1);
if(len == 0){
resolve();
return;
}
let lastView = this.getChildAt(len);
while (this.children.length > 2) {
this.removeChildAt(0);
}
if (this._mutex) {
this._stack.splice(0);
......@@ -205,7 +210,7 @@ export class StackContainer extends Node {
this.addChild(view);
}
let data = {action, view, lastView, options, hasView: len > 1};
let data = {action, view, lastView, options, hasView: false};
this.dispatchEvent(Event.START, data);
playViewEffect(
playEffect ? options ? options.effect : null : null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment