feat(carousel): enhance image loading strategy and improve product display in carousel
This commit is contained in:
@@ -15,11 +15,14 @@
|
||||
<img
|
||||
class="main-carousel__image"
|
||||
[class.main-carousel__image--active]="index === activeIndex()"
|
||||
[src]="image"
|
||||
[attr.src]="imageSource(image, index)"
|
||||
[alt]="imageAlt(index)"
|
||||
[attr.aria-hidden]="index === activeIndex() ? null : 'true'"
|
||||
[attr.loading]="index === 0 ? 'eager' : 'lazy'"
|
||||
loading="eager"
|
||||
[attr.fetchpriority]="index === activeIndex() ? 'high' : 'low'"
|
||||
draggable="false"
|
||||
(load)="handleImageLoad(index)"
|
||||
(error)="handleImageError(index)"
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user