forked from NG-ZORRO/ng-zorro-antd
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(showcase): optimization docs (NG-ZORRO#733)
- Loading branch information
1 parent
383a0f4
commit 29318db
Showing
3 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
src/showcase/nz-demo-message/nz-demo-message-loading.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import {Component} from '@angular/core'; | ||
import {NzMessageService} from '../../../index.showcase'; | ||
import { Component } from '@angular/core'; | ||
import { NzMessageService } from '../../../index.showcase'; | ||
|
||
@Component({ | ||
selector : 'nz-demo-message-loading', | ||
template : ` | ||
<button nz-button [nzType]="'default'" (click)="createBasicMessage()">显示加载中</button> | ||
`, | ||
`, | ||
styles : [] | ||
}) | ||
export class NzDemoMessageLoadingComponent { | ||
_id; | ||
createBasicMessage = () => { | ||
this._id = this._message.loading('正在执行中', { nzDuration: 0 }).messageId; | ||
setTimeout(_ => { | ||
this._message.remove(this._id); | ||
}, 2500) | ||
}; | ||
|
||
constructor(private _message: NzMessageService) { | ||
} | ||
} | ||
|
||
createBasicMessage(): void { | ||
const id = this._message.loading('正在执行中', {nzDuration: 0}).messageId; | ||
setTimeout(_ => { | ||
this._message.remove(id); | ||
}, 2500); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters