【问题标题】:Issue with lightning carousel闪电轮播的问题
【发布时间】:2019-10-31 13:07:50
【问题描述】:

我在 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>

【问题讨论】:

    标签: salesforce carousel salesforce-lightning lwc


    【解决方案1】:

    是的,我们只能使用标准闪电轮播组件显示 5-6 张图片,更多详情请收藏此链接https://developer.salesforce.com/docs/component-library/bundle/lightning:carousel

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多