0

有没有办法使用ngx-crystal-gallary为网格视图中的每个图像添加标题标签

 <crystal-gallery [images]="selectedFolder.imageUrlsWithPreview" [config]="myConfig">
  </crystal-gallery>
4

1 回答 1

0
myImages = [
    {
        preview: 'path_to_preview',
        full: 'path_to_full_image',
        width: natural_width, // used for masonry
        height: natural_height // used for masonry
        description: '<description/title of the image>' // optional property
    },
    ...
myConfig = {
    ...
};
];
<crystal-gallery [images]="myImages" [config]="myConfig"></crystal-gallery>

结果:

在此处输入图像描述

更新:

对于您的特定用例,ngx-crystal-gallery 不支持图像网格上的标题。

替代方案:使用ng-image-slider

于 2021-02-16T09:37:01.637 回答