mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 15:51:16 +08:00
fix(tabs): fullscreen
This commit is contained in:
@ -235,7 +235,7 @@ ion-page,
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
contain: strict;
|
||||
contain: layout size style;
|
||||
}
|
||||
|
||||
// Page Container Structure
|
||||
|
||||
@ -87,8 +87,10 @@ export class Content {
|
||||
return;
|
||||
}
|
||||
if (this.fullscreen) {
|
||||
Context.dom.read(this.readDimensions.bind(this));
|
||||
Context.dom.write(this.writeDimensions.bind(this));
|
||||
Context.dom.raf(() => {
|
||||
Context.dom.read(this.readDimensions.bind(this));
|
||||
Context.dom.write(this.writeDimensions.bind(this));
|
||||
});
|
||||
} else {
|
||||
this.cTop = this.cBottom = null;
|
||||
Context.dom.write(() => this.scrollEl.removeAttribute('style'));
|
||||
|
||||
@ -39,7 +39,7 @@ export class PageTab {
|
||||
<ion-title>Tab page</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>,
|
||||
<ion-content>
|
||||
<ion-content fullscreen={true}>
|
||||
<p>
|
||||
<h2>Set tabbar layout</h2>
|
||||
<ion-button onClick={() => this.setLayout('icon-top')}>icon-top</ion-button>
|
||||
|
||||
@ -12,7 +12,7 @@ ion-tabs {
|
||||
|
||||
flex: 1;
|
||||
|
||||
contain: strict;
|
||||
contain: layout size style;
|
||||
}
|
||||
|
||||
ion-tab {
|
||||
@ -25,7 +25,7 @@ ion-tab {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
contain: strict;
|
||||
contain: layout size style;
|
||||
}
|
||||
|
||||
ion-tab.show-tab {
|
||||
|
||||
@ -139,6 +139,10 @@ export function getParentElement(elm: any) {
|
||||
}
|
||||
|
||||
export function getPageElement(el: HTMLElement) {
|
||||
const tabs = el.closest('ion-tabs');
|
||||
if (tabs) {
|
||||
return tabs;
|
||||
}
|
||||
const page = el.closest('ion-page,.ion-page,page-inner');
|
||||
if (page) {
|
||||
return page;
|
||||
|
||||
Reference in New Issue
Block a user