mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
fix(content): adjust footer bottom based on the tabbar without padding
This commit is contained in:
@ -530,14 +530,14 @@ export class Content extends Ion {
|
|||||||
newVal = this._footerHeight + this._paddingBottom;
|
newVal = this._footerHeight + this._paddingBottom;
|
||||||
if (this._tabbarPlacement === 'bottom') {
|
if (this._tabbarPlacement === 'bottom') {
|
||||||
newVal += this._tabbarHeight;
|
newVal += this._tabbarHeight;
|
||||||
|
|
||||||
|
if (newVal > 0 && this._footerEle) {
|
||||||
|
this._footerEle.style.bottom = (newVal - this._footerHeight - this._paddingBottom) + 'px';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (newVal !== this.adjustedBottom) {
|
if (newVal !== this.adjustedBottom) {
|
||||||
scrollEle.style.paddingBottom = (newVal > 0 ? newVal + 'px' : '');
|
scrollEle.style.paddingBottom = (newVal > 0 ? newVal + 'px' : '');
|
||||||
this.adjustedBottom = newVal;
|
this.adjustedBottom = newVal;
|
||||||
|
|
||||||
if (newVal > 0 && this._footerEle) {
|
|
||||||
this._footerEle.style.bottom = (newVal - this._footerHeight) + 'px';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
<ion-toolbar class="opaque">
|
<ion-toolbar class="opaque">
|
||||||
<ion-title>Footer</ion-title>
|
<ion-title>Footer</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
<ion-toolbar class="opaque">
|
||||||
|
<ion-title>Footer 2</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
</ion-footer>
|
</ion-footer>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -28,6 +28,9 @@
|
|||||||
<ion-toolbar class="opaque">
|
<ion-toolbar class="opaque">
|
||||||
<ion-title>Footer</ion-title>
|
<ion-title>Footer</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
<ion-toolbar class="opaque">
|
||||||
|
<ion-title>Footer 2</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
</ion-footer>
|
</ion-footer>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
Reference in New Issue
Block a user