mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(content): resize() is called on nav change
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
import { Component, Element, Method, Prop } from '@stencil/core';
|
import { Component, Element, Listen, Method, Prop } from '@stencil/core';
|
||||||
import { Config } from '../../index';
|
import { Config } from '../../index';
|
||||||
import { createThemedClasses, getElementClassObject } from '../../utils/theme';
|
import { createThemedClasses, getElementClassObject } from '../../utils/theme';
|
||||||
import { getPageElement } from '../../utils/helpers';
|
import { getPageElement } from '../../utils/helpers';
|
||||||
@ -46,6 +46,11 @@ export class Content {
|
|||||||
*/
|
*/
|
||||||
@Prop() fullscreen: boolean = false;
|
@Prop() fullscreen: boolean = false;
|
||||||
|
|
||||||
|
@Listen('body:ionNavChanged')
|
||||||
|
onNavChanged() {
|
||||||
|
this.resize();
|
||||||
|
}
|
||||||
|
|
||||||
componentDidLoad() {
|
componentDidLoad() {
|
||||||
this.scrollEl = this.el.querySelector('ion-scroll') as HTMLIonScrollElement;
|
this.scrollEl = this.el.querySelector('ion-scroll') as HTMLIonScrollElement;
|
||||||
this.resize();
|
this.resize();
|
||||||
|
|||||||
@ -34,9 +34,12 @@ export class TranslucentPageTab {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
return [
|
return [
|
||||||
<ion-header>
|
<ion-header translucent>
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>Tab Translucent</ion-title>
|
<ion-title>App Store</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-searchbar></ion-searchbar>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>,
|
</ion-header>,
|
||||||
<ion-content fullscreen={true}>
|
<ion-content fullscreen={true}>
|
||||||
|
|||||||
Reference in New Issue
Block a user