参考demo:pushPathsingleTask(info: NavPathInfo, animated?: boolean): void { this.pageArray =[] this.pageArray = this.pageInfos.getIndexByName(info.name) if(this.pageArray.length == 0){ this.pageInfos.pushPath(info, animated)return; } this.pageInfos.popToIndex(this.pageArray.pop(), animated) }
参考demo: