mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
refactor(all): enable ts strict
This commit is contained in:
@ -13,7 +13,7 @@ export default function iosLeaveAnimation(Animation: Animation, baseEl: HTMLElem
|
||||
const wrapperAnimation = new Animation();
|
||||
const wrapperEl = baseEl.querySelector('.modal-wrapper');
|
||||
wrapperAnimation.addElement(wrapperEl);
|
||||
const wrapperElRect = wrapperEl.getBoundingClientRect();
|
||||
const wrapperElRect = wrapperEl!.getBoundingClientRect();
|
||||
|
||||
wrapperAnimation.beforeStyles({ 'opacity': 1 })
|
||||
.fromTo('translateY', '0%', `${window.innerHeight - wrapperElRect.top}px`);
|
||||
|
||||
@ -166,9 +166,12 @@ export class Modal implements OverlayInterface {
|
||||
@Method()
|
||||
async present(): Promise<void> {
|
||||
if (this.presented) {
|
||||
return Promise.resolve();
|
||||
return;
|
||||
}
|
||||
const container = this.el.querySelector(`.modal-wrapper`);
|
||||
if (!container) {
|
||||
throw new Error('container is undefined');
|
||||
}
|
||||
const componentProps = {
|
||||
...this.componentProps,
|
||||
modal: this.el
|
||||
|
||||
Reference in New Issue
Block a user