mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
refactor(content): add ion-fixed component and move from content
This commit is contained in:
@ -93,3 +93,22 @@ export function applyStyles(elm: HTMLElement, styles: {[styleProp: string]: stri
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function getToolbarHeight(toolbarTagName: string, pageChildren: HTMLElement[], mode: string, iosHeight: string, defaultHeight: string) {
|
||||
for (var i = 0; i < pageChildren.length; i++) {
|
||||
if (pageChildren[i].tagName === toolbarTagName) {
|
||||
var headerHeight = pageChildren[i].getAttribute(`${mode}-height`);
|
||||
if (headerHeight) {
|
||||
return headerHeight;
|
||||
}
|
||||
|
||||
if (mode === 'ios') {
|
||||
return iosHeight;
|
||||
}
|
||||
|
||||
return defaultHeight;
|
||||
}
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
Reference in New Issue
Block a user