From e33b554c3ca53017912a90612158f49ad6b8fbae Mon Sep 17 00:00:00 2001 From: fengxiang <110431245@qq.com> Date: Tue, 27 Mar 2018 11:06:38 +0800 Subject: [PATCH] 修复msg 弹窗不出现的问题 --- src/app/app.component.ts | 51 ++++++++++++++++++++++++++------------------------- 1 files changed, 26 insertions(+), 25 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 00faf0f..deb9587 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -25,33 +25,34 @@ ngOnInit() { this.router.events - .pipe(filter(evt => evt instanceof NavigationEnd)) - .subscribe(() => this.titleSrv.setTitle()); - this.router.events.pipe( - filter(evt => evt instanceof NavigationStart) - ) + .pipe(filter(evt => evt instanceof NavigationEnd)) + .subscribe(() => this.titleSrv.setTitle()); + this.router.events.pipe( + filter(evt => evt instanceof NavigationStart) + ) .subscribe(() => { - // ��������������������������������� - const cdkOverlayContainer = $('.cdk-overlay-container'); - if (cdkOverlayContainer != null && cdkOverlayContainer.children().length > 1) { - cdkOverlayContainer.children('div:first-child').nextAll().each( - function(index, el) { - if ($(el).hasClass('cdk-overlay-backdrop-showing')) { - $(el).remove(); - } else { - $(el).empty(); - } - } - ); - } - // ������������������������ - if ($('.ant-modal-close').length > 0) { - $('.ant-modal-close').click(); - } - // ������������������������ - if ($('.ant-select-open').length > 0) { + // ������������������������ + if ($('.ant-modal-close').length > 0) { + $('.ant-modal-close').click(); + } + // ������������������������ + if ($('.ant-select-open').length > 0) { $('.ant-select-open').click(); - } + } + // ��������������������������������� + const cdkOverlayContainer = $('.cdk-overlay-container'); + if (cdkOverlayContainer != null && cdkOverlayContainer.children().length > 2) { + cdkOverlayContainer.children('div:first-child').next().nextAll().each( + function (index, el) { + if ($(el).hasClass('cdk-overlay-backdrop-showing')) { + $(el).remove(); + } else { + $(el).empty(); + } + } + ); + } + }); } } -- Gitblit v1.8.0