@aligov/components-img-thumb

图片展示小图,点击展示大图

Usage no npm install needed!

<script type="module">
  import aligovComponentsImgThumb from 'https://cdn.skypack.dev/@aligov/components-img-thumb';
</script>

README

图片展示小图点击展示大图

@aligov/components-img-thumb

图片展示小图,点击展示大图

用法

import ImgThumb from '@aligov/components-img-thumb';

<ImgThumb src={imgSrc} />

API

参数名 说明 必填 类型 默认值 备注
src 图片地址 Y string
alt 图片 alt 信息 string
width 缩略图宽度 css width 有效值或数字(等同于px) 30px
height 缩略图高度 css height 有效值或数字(等同于px) 30px
trigger 自定义触发器而不是缩略图 React 元素