Fix global message display issue

This commit is contained in:
kunw 2017-06-08 18:37:16 +08:00
parent 2e5a4003a8
commit 0c15dac241
2 changed files with 2 additions and 6 deletions

View File

@ -1,4 +1,4 @@
<div class="global-message-alert" [hidden]="hideOuter">
<div [class.global-message-alert]="!isAppLevel">
<clr-alert [clrAlertType]="globalMessage.type" [clrAlertAppLevel]="isAppLevel" [(clrAlertClosed)]="!globalMessageOpened" (clrAlertClosedChange)="onClose()">
<div class="alert-item">
<span class="alert-text">

View File

@ -33,7 +33,6 @@ export class MessageComponent implements OnInit, OnDestroy {
globalMessageOpened: boolean;
messageText: string = "";
timer: any = null;
hideOuter: boolean = true;
appLevelMsgSub: Subscription;
msgSub: Subscription;
@ -79,8 +78,6 @@ export class MessageComponent implements OnInit, OnDestroy {
let hackDom: any = queryDoms[0];
hackDom.className += ' alert-global alert-global-align';
}
this.hideOuter = false;
}, 0);
}
@ -138,6 +135,5 @@ export class MessageComponent implements OnInit, OnDestroy {
clearTimeout(this.timer);
}
this.globalMessageOpened = false;
this.hideOuter = true;
}
}