forked from NG-ZORRO/ng-zorro-antd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
loading.ts
39 lines (38 loc) 路 1.29 KB
/
loading.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { Component } from '@angular/core';
@Component({
selector: 'nz-demo-card-loading',
template: `
<nz-switch [(ngModel)]="loading"></nz-switch>
<nz-card style="width: 300px;margin-top: 16px" [nzLoading]="loading">
<nz-card-meta
[nzAvatar]="avatarTemplate"
nzTitle="Card title"
nzDescription="This is the description"
></nz-card-meta>
</nz-card>
<nz-card style="width: 300px;margin-top: 16px" [nzActions]="[actionSetting, actionEdit, actionEllipsis]">
<nz-skeleton [nzActive]="true" [nzLoading]="loading" [nzAvatar]="{ size: 'large' }">
<nz-card-meta
[nzAvatar]="avatarTemplate"
nzTitle="Card title"
nzDescription="This is the description"
></nz-card-meta>
</nz-skeleton>
</nz-card>
<ng-template #avatarTemplate>
<nz-avatar nzSrc="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"></nz-avatar>
</ng-template>
<ng-template #actionSetting>
<span nz-icon nzType="setting"></span>
</ng-template>
<ng-template #actionEdit>
<span nz-icon nzType="edit"></span>
</ng-template>
<ng-template #actionEllipsis>
<span nz-icon nzType="ellipsis"></span>
</ng-template>
`
})
export class NzDemoCardLoadingComponent {
loading = true;
}