mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
fix(overlay): cssClasses applied to overlay
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
|
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
|
||||||
import { Animation, AnimationBuilder, ComponentProps, ComponentRef, Config, FrameworkDelegate } from '../../index';
|
import { Animation, AnimationBuilder, ComponentProps, ComponentRef, Config, FrameworkDelegate } from '../../index';
|
||||||
|
|
||||||
import { createThemedClasses, getClassList } from '../../utils/theme';
|
import { createThemedClasses, getClassMap } from '../../utils/theme';
|
||||||
import { BACKDROP, OverlayEventDetail, OverlayInterface, dismiss, eventMethod, present } from '../../utils/overlays';
|
import { BACKDROP, OverlayEventDetail, OverlayInterface, dismiss, eventMethod, present } from '../../utils/overlays';
|
||||||
import { attachComponent, detachComponent } from '../../utils/framework-delegate';
|
import { attachComponent, detachComponent } from '../../utils/framework-delegate';
|
||||||
|
|
||||||
@ -176,11 +176,7 @@ export class Modal implements OverlayInterface {
|
|||||||
...this.componentProps,
|
...this.componentProps,
|
||||||
modal: this.el
|
modal: this.el
|
||||||
};
|
};
|
||||||
const classes = [
|
this.usersElement = await attachComponent(this.delegate, container, this.component, ['ion-page'], componentProps);
|
||||||
...getClassList(this.cssClass),
|
|
||||||
'ion-page'
|
|
||||||
];
|
|
||||||
this.usersElement = await attachComponent(this.delegate, container, this.component, classes, componentProps);
|
|
||||||
return present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation);
|
return present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,6 +218,7 @@ export class Modal implements OverlayInterface {
|
|||||||
hostData() {
|
hostData() {
|
||||||
return {
|
return {
|
||||||
'no-router': true,
|
'no-router': true,
|
||||||
|
class: getClassMap(this.cssClass),
|
||||||
style: {
|
style: {
|
||||||
zIndex: 20000 + this.overlayId,
|
zIndex: 20000 + this.overlayId,
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
|
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
|
||||||
import { Animation, AnimationBuilder, ComponentProps, ComponentRef, Config, FrameworkDelegate } from '../../index';
|
import { Animation, AnimationBuilder, ComponentProps, ComponentRef, Config, FrameworkDelegate } from '../../index';
|
||||||
|
|
||||||
import { createThemedClasses, getClassList } from '../../utils/theme';
|
import { createThemedClasses, getClassMap } from '../../utils/theme';
|
||||||
import { BACKDROP, OverlayEventDetail, OverlayInterface, dismiss, eventMethod, present } from '../../utils/overlays';
|
import { BACKDROP, OverlayEventDetail, OverlayInterface, dismiss, eventMethod, present } from '../../utils/overlays';
|
||||||
import { attachComponent, detachComponent } from '../../utils/framework-delegate';
|
import { attachComponent, detachComponent } from '../../utils/framework-delegate';
|
||||||
|
|
||||||
@ -186,11 +186,7 @@ export class Popover implements OverlayInterface {
|
|||||||
...this.componentProps,
|
...this.componentProps,
|
||||||
popover: this.el
|
popover: this.el
|
||||||
};
|
};
|
||||||
const classes = [
|
this.usersElement = await attachComponent(this.delegate, container, this.component, ['popover-viewport'], data);
|
||||||
...getClassList(this.cssClass),
|
|
||||||
'popover-viewport'
|
|
||||||
];
|
|
||||||
this.usersElement = await attachComponent(this.delegate, container, this.component, classes, data);
|
|
||||||
return present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, this.ev);
|
return present(this, 'popoverEnter', iosEnterAnimation, mdEnterAnimation, this.ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +234,8 @@ export class Popover implements OverlayInterface {
|
|||||||
},
|
},
|
||||||
'no-router': true,
|
'no-router': true,
|
||||||
class: {
|
class: {
|
||||||
...themedClasses
|
...themedClasses,
|
||||||
|
...getClassMap(this.cssClass),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user