如何在ngx-gallery中打印图像?

时间:2018-02-13 08:49:48

标签: javascript angular typescript gallery

我正在使用angular和ngx-gallery来查看图像。如何在图库中打印图像? 这是我在HTML中的ngx-gallery代码:

<div fxLayout="row" fxLayoutAlign="center center" class="mt-1">
   <ngx-gallery #gallery [options]="galleryOptions" [images]="images" *ngIf="images.length"></ngx-gallery>
</div>

我的图库代码:

this.galleryOptions = [
            {
              width: '600px',
              height: '1100px',
              thumbnailsColumns: 4,
              imageAnimation: NgxGalleryAnimation.Slide,
            },
            // max-width 800
            {
              breakpoint: 400,
              // width: '2%',
              // height: '2px',
              imagePercent: 99,
              thumbnailsPercent: 1,
              thumbnailsMargin: 20,
              thumbnailMargin: 20,
            },
            // max-width 400
            {
              breakpoint: 400,
              preview: false,
            }
          ];

          if (mail.mail.rows[0].attach_files) {
            for (let i in mail.mail.rows[0].attach_files) {
              let image = JSON.parse(mail.mail.rows[0].attach_files[i]);
              this.galleryImages = [
                {
                  small: '/assets/uploads/mail_files/' + image.name,
                  medium: '/assets/uploads/mail_files/' + image.name,
                  big: '/assets/uploads/mail_files/' + image.name
                }
              ];
              this.images.push(this.galleryImages[0]);
            }
          }

我的页面上有一个按钮,我想打开一个弹出窗口进行打印。

0 个答案:

没有答案