feat: optimize performance with lazy loading and change detection improvements
chore: update build configurations and remove unused styles fix: enhance user experience with loading indicators and improved asset management
This commit is contained in:
@@ -6,9 +6,14 @@
|
||||
</div>
|
||||
}
|
||||
} @else {
|
||||
@for (good of goods(); track good.id) {
|
||||
@for (good of visibleGoods(); track good.id) {
|
||||
<div class="flex-1 bg-surface-card rounded-lg p-1 shadow-xs" (click)="addProduct(good)">
|
||||
<img [src]="good.image_url || goodPlaceholder" class="w-full aspect-[1.3] object-cover rounded-md" />
|
||||
<img
|
||||
[src]="good.image_url || goodPlaceholder"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
class="w-full aspect-[1.3] object-cover rounded-md"
|
||||
/>
|
||||
<div class="mt-2 text-center">
|
||||
<span class="text-lg font-bold text-center">
|
||||
{{ good.name }}
|
||||
@@ -25,3 +30,8 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@if (!loading() && hasMore()) {
|
||||
<div class="flex justify-center mt-3">
|
||||
<button pButton type="button" outlined (click)="loadMore()">نمایش کالاهای بیشتر</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user