
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
image-viewer-react
Advanced tools
基于photoSwipe的图片预览插件--React版
npm install image-viewer-react -S
详见 examples/src
| 名称 | 默认 | 意义 |
|---|---|---|
| index | 0 | 打开时需要展示的图片索引 |
| imgs | [] | 图片url |
| visible | - | 控制显示隐藏,使用方式一时该项不传 |
| options | {} | 参考photoSwipe的option |
| onClose | - | onClose |
外部控制组件生成和销毁
const { list, open, index } = this.state;
{open && <ImageViewer
imgs={list}
index={index}
onClose={()=>{this.setState({open:false})}}
/>
组件内部控制生成和销毁
const { list, open, index } = this.state;
<ImageViewer
visible={open} imgs={list} index={index}
onClose={()=>{this.setState({open:false})}} />
├── LICENSE
├── README.md
├── dist // 产物外链版本
├── esm // 产物ES6版本
├── examples // 示例代码
├── lib // 产物ES5正常版本
├── node_modules
├── package-lock.json
├── package.json
├── rollup.config.js
├── src // 源代码
├── style // 源代码样式
└── webpack.config.js
dist: 外链版本,通过script标签引入esm: es6语法版本lib: es5语法常用版本FAQs
移动端大图预览插件-React版
The npm package image-viewer-react receives a total of 8 weekly downloads. As such, image-viewer-react popularity was classified as not popular.
We found that image-viewer-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.