h5 dist update

This commit is contained in:
王劲鹏 2020-01-10 17:43:25 +08:00 committed by osborn
parent 26d32d788e
commit 048b8414d8
2 changed files with 25 additions and 2 deletions

View File

@ -2269,7 +2269,12 @@ class Panel {
if (cur === this.__root__.viewId) { if (cur === this.__root__.viewId) {
return this.__root__; return this.__root__;
} }
return this.headviews.get(cur); for (let map of this.headviews.values()) {
if (map.has(cur)) {
return map.get(cur);
}
}
return undefined;
} }
else { else {
if (Reflect.has(acc, "subviewById")) { if (Reflect.has(acc, "subviewById")) {
@ -3354,6 +3359,10 @@ function modal(context) {
function navbar(context) { function navbar(context) {
const entity = context.entity; const entity = context.entity;
let panel = undefined;
if (entity instanceof Panel) {
panel = entity;
}
return { return {
isHidden: () => { isHidden: () => {
return context.navbar.isHidden(); return context.navbar.isHidden();
@ -3373,6 +3382,20 @@ function navbar(context) {
color: color.toModel(), color: color.toModel(),
}); });
}, },
setLeft: (view) => {
if (panel) {
panel.clearHeadViews("navbar_left");
panel.addHeadView("navbar_left", view);
}
return context.navbar.setLeft(view.toModel());
},
setRight: (view) => {
if (panel) {
panel.clearHeadViews("navbar_right");
panel.addHeadView("navbar_right", view);
}
return context.navbar.setRight(view.toModel());
}
}; };
} }

File diff suppressed because one or more lines are too long