From b8b94e846dcde8680deff869ea65caee23c3bc89 Mon Sep 17 00:00:00 2001 From: xufenglei <xufenglei> Date: Tue, 03 Apr 2018 10:56:14 +0800 Subject: [PATCH] 报表优化 --- src/app/app.component.ts | 53 +++++++++++++++++++++++++++-------------------------- 1 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 90c68af..deb9587 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -20,38 +20,39 @@ private settings: SettingsService, private router: Router, private titleSrv: TitleService, - private loginService:LoginService) { + private loginService: LoginService) { } 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(() => { - // ��������������������������������� - let cdkOverlayContainer = $('.cdk-overlay-container'); - if(cdkOverlayContainer!=null&&cdkOverlayContainer.children().length>1){ - cdkOverlayContainer.children('div:first-child').nextAll().each( - function(index,element){ - if($(element).hasClass('cdk-overlay-backdrop-showing')){ - $(element).remove(); - }else{ - $(element).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