mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(split-pane): prerender
This commit is contained in:
@ -29,6 +29,8 @@ export class SplitPane {
|
|||||||
@Element() private el: HTMLElement;
|
@Element() private el: HTMLElement;
|
||||||
@State() visible = false;
|
@State() visible = false;
|
||||||
|
|
||||||
|
@Prop({context: 'isServer'}) isServer: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If true, the split pane will be hidden. Defaults to `false`.
|
* If true, the split pane will be hidden. Defaults to `false`.
|
||||||
*/
|
*/
|
||||||
@ -70,6 +72,9 @@ export class SplitPane {
|
|||||||
|
|
||||||
@Watch('when')
|
@Watch('when')
|
||||||
protected whenChanged() {
|
protected whenChanged() {
|
||||||
|
if (this.isServer) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.rmL && this.rmL();
|
this.rmL && this.rmL();
|
||||||
this.rmL = null;
|
this.rmL = null;
|
||||||
|
|
||||||
@ -121,6 +126,9 @@ export class SplitPane {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _styleChildren() {
|
private _styleChildren() {
|
||||||
|
if (this.isServer) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const children = this.el.children;
|
const children = this.el.children;
|
||||||
const nu = this.el.childElementCount;
|
const nu = this.el.childElementCount;
|
||||||
let foundMain = false;
|
let foundMain = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user