mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
refactor(dom): attachComponent()
This commit is contained in:
@ -1,8 +1,9 @@
|
||||
import { Component, Element, Event, EventEmitter, Listen, Method, Prop } from '@stencil/core';
|
||||
import { Animation, AnimationBuilder, Config, FrameworkDelegate } from '../../index';
|
||||
|
||||
import { createThemedClasses, getClassMap } from '../../utils/theme';
|
||||
import { BACKDROP, OverlayEventDetail, OverlayInterface, attachComponent, detachComponent, dismiss, eventMethod, present } from '../../utils/overlays';
|
||||
import { createThemedClasses, getClassList } from '../../utils/theme';
|
||||
import { BACKDROP, OverlayEventDetail, OverlayInterface, dismiss, eventMethod, present } from '../../utils/overlays';
|
||||
import { attachComponent, detachComponent } from '../../utils/framework-delegate';
|
||||
|
||||
import iosEnterAnimation from './animations/ios.enter';
|
||||
import iosLeaveAnimation from './animations/ios.leave';
|
||||
@ -172,10 +173,10 @@ export class Modal implements OverlayInterface {
|
||||
...this.data,
|
||||
modal: this.el
|
||||
};
|
||||
const classes = {
|
||||
...getClassMap(this.cssClass),
|
||||
'ion-page': true
|
||||
};
|
||||
const classes = [
|
||||
...getClassList(this.cssClass),
|
||||
'ion-page'
|
||||
];
|
||||
return attachComponent(this.delegate, container, this.component, classes, data)
|
||||
.then(el => this.usersElement = el)
|
||||
.then(() => present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation));
|
||||
|
Reference in New Issue
Block a user