Commit 613587a0 authored by liujiangnan's avatar liujiangnan

fix: 标题问题

parent 4bf2ee1f
......@@ -990,7 +990,7 @@
"vertical": true,
"inertia": true,
"brake": 0.75,
"elastic": true,
"elastic": false,
"bounceDuration": 0.23,
"scrollEvents": [],
"cancelInnerEvents": true,
......
......@@ -96,6 +96,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async drawPage() {
const contentNode = cc.find("Canvas/pages/view/content");
contentNode.active = false;
const item = cc.find("item", contentNode);
// 清理原来的数据
item.parent = this.node;
......@@ -138,6 +139,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
});
}
contentNode.active = true;
cc.find(`Canvas/pages`).getComponent(cc.ScrollView).scrollToTop(0.1);
}
async initView() {
......@@ -163,7 +166,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (routers.length === 0) {
cc.find(`Canvas/lefttop`).active = false;
} else {
cc.find(`Canvas/lefttop/bg_title/title`).getComponent(cc.Label).string = item.name;
cc.find(`Canvas/lefttop/bg_title/title`).getComponent(cc.Label).string = routers[routers.length-1].name;
}
});
}
......
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