0.3.9 • Published 3 years ago
@q673115816/pics-viewer v0.3.9
用 react 实现网易云图片浏览插件
image viewer component built with React.
Installation
npm
Example
import React from "react";
import PicsViewer from "@q673115816/pics-viewer";
const srcList = [
{
width: 560,
height: 560,
detail: "https://cdn.jsdelivr.net/gh/q673115816/cdn/image/佐菲.jpg",
thumb: "https://cdn.jsdelivr.net/gh/q673115816/cdn/image/佐菲.jpg",
},
];
const App = () => {
return <PicsViewer srcList={srcList} />;
};
Props
interface PicsViewer {
srcList: {
width: number | string;
height: number | string;
detail: string;
thumb?: string;
}[];
className?: string;
el?: string; // appendDOM default = document.body
}