Intro 介绍
A wrapper of picsum.photos to generate random image placeholder
一个调用 picsum.photos 的库, 可以生成随机占位图片
Use 使用方式
npm install -S random-image-placeholder
// import 引入const ImgPlaceholder = ; // create instance 创建实例// options is optional 配置选项是可选的const imgGenerator = options; // generate 生成图片地址const url = imgGenerator;console;
Options 配置选项
width in pixel 像素宽度
const imgGenerator = width: 200;