for (let index in data) { let page = new cc.Node(); page.setPosition(cc.v2(360+720*parseInt(index),0)); page.setContentSize(cc.size(720,640)); cc.loader.loadRes("prefab/xxx", (err, prefab) => { let dialog = cc.instantiate(prefab); dialog.setPosition(cc.v2(-360,-320)); page.addChild(dialog, 1000); }); this.m_pageView.addPage(page); }