Feature: add Image component
why520crazy opened this issue · 0 comments
why520crazy commented
Add Image Components for display and preview.
Add thyImage directive
<img thyImage thySrc="/example/a-thumbnail.png" thyPreviewSrc="/example/a-preview.png" thyOriginSrc="/example/preview.png" />
- thyPreviewSrc: image preview src
- thyOriginSrc: image origin src
Add thy-image-group components
<thy-image-group>
<img thyImage width="200px" thySrc="/example/a-thumbnail.png" alt="" />
<img thyImage width="200px" thySrc="/example/a-thumbnail.png" alt="" />
</thy-image-group>
Add ThyImageService
const images = [
{
src: '/example/a-preview.png',
width: '200px',
height: '200px',
alt: 'Tethys'
},
{
src: '/example/b-preview.png',
width: '200px',
height: '200px',
alt: 'Angular'
}
];
this.imageService.preview(images, options: ThyImagePreviewOptions);