【问题标题】:How to display a picture bigger when using the angular-modal-gallery-v7使用angular-modal-gallery-v7时如何显示更大的图片
【发布时间】:2023-02-06 21:14:10
【问题描述】:

我正在使用 angular-modal-gallery 版本 7。

我要把图片显示大一点enter image description here

我的模板代码是:

     <ks-modal-gallery [id]="200" 
     [modalImages]="arrayImage" 
     [plainGalleryConfig]="plainGalleryRow" 
     [currentImageConfig]="{description: {strategy: 2, imageText: ''}}"
     [previewConfig]="{visible: true, size: {width: 'auto', height: 'auto'}}"
     [slideConfig]="{infinite: true, sidePreviews: {show: false}}"
     [dotsConfig]="{visible: false}">
     </ks-modal-gallery>

我的组件代码是:

     plainGalleryRow: PlainGalleryConfig = {
     strategy: PlainGalleryStrategy.ROW,
     layout: new LineLayout({ width: '0px', height: '0px' }, { length: 2, wrap: true }, 'flex-start')
     };

请任何人都可以帮助找到解决方案吗?

【问题讨论】:

    标签: html angular typescript


    【解决方案1】:

    Angular Modal Gallery v7 是一个用于在 Angular 中创建模态图像库的库。要显示更大的图片,您可以增加包含图像的模态窗口的大小。下面是一个示例代码,展示了如何执行此操作:

    <ks-modal-image [id]="0" [modalImages]="images" [conf]="conf"></ks-modal-image>
    

    <ng-template #customFooter let-data="数据">

    在此示例中,customFooter 模板将显示图像的宽度设置为 500px。您可以调整宽度和高度以获得所需的显示尺寸。

    【讨论】:

      猜你喜欢
      • 2022-07-26
      • 2023-04-04
      • 1970-01-01
      • 1970-01-01
      • 2018-08-21
      • 1970-01-01
      • 2015-09-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多