我正在用lwc建造的闪电传送带遇到一些问题,就像它在传送带内部仅显示5到6张图像,而其余的都没有显示。如果图像数量有任何限制,您可以建议最佳方法或替代方法,例如HTML幻灯片显示或以其他方式在转盘中构建1000幅图像的转盘。在这里,我从父组件加载图像。
import { LightningElement, api } from "lwc";
export default class fcxmCarousel extends LightningElement {
@api selectdImage;
@api value;
}
<template>
<div class="slds-m-around_medium">
<div class="container">
<lightning-carousel>
<template for:each={value} for:item="rows">
<lightning-carousel-image width="100%" height="50%" key={imageURL} src = {rows.imageURL}
header={rows.imageName}
description={rows.imageDescription}>
</lightning-carousel-image>
</template>
</lightning-carousel>
</div>
</div>
<!-- </lightning-card> -->
</template>
是的,我们只能使用标准的闪电轮播组件显示5-6张图像,有关更多详细信息,请恢复此链接https://developer.salesforce.com/docs/component-library/bundle/lightning:carousel