我是在用angular-cil写项目时,需要用到骨架屏,初步是这样写的,以后继续深化
链接:https://ng.ant.design/components/skeleton/zh
在项目里引入骨架屏组件之间后,开始使用,我看的是‘包含子组件’这个例子。具体如下:
事例
html里:
<div class="article">
<nz-skeleton [nzLoading]="loading">
<h4>Ant Design, a design language</h4>
<p>
We supply a series of design principles, practical patterns and high quality design resources (Sketch and
Axure), to help people create their product prototypes beautifully and efficiently.
</p>
</nz-skeleton>
<button nz-button (click)="showSkeleton()" [disabled]="loading">
Show Skeleton
</button>
</div>
css里(可有可无)