Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
pic-viewer
Advanced tools
$ yarn add pic-viewer
依赖项:vue
全局引入
import PicViewer from 'pic-viewer'
Vue.use(PicViewer)
局部引入
import { PicViewer } from 'pic-viewer'
components: { PicViewer }
自适应瀑布流布局
<PicViewer :value=""/>
文档流布局
典型应用场景:表格
<el-table>
<el-table-column label="图片">
<template slot-scope="{ row }">
<PicViewer :waterfall="false" :value="row.img"/>
</template>
</el-table-column>
</el-table>
手动调用预览 不在外部陈列展示
<PicViewer :value="" v-show="false" ref="PicViewer"/>
<el-button @click="()=>{$refs.PicViewer.preview(6)}">预览</el-button>
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
value | 图片链接 | String / Array[String] / Array[Object] | ||
objectKey | 如果数组元素为对象 需要指定图片对应的key | String | ||
waterfall | 是否瀑布流布局 | Boolean | true |
方法名 | 说明 | 参数 |
---|---|---|
preview | 手动预览 | value数组下标(value类型为Array时需要 默认0) |
FAQs
Picture viewer.
The npm package pic-viewer receives a total of 6 weekly downloads. As such, pic-viewer popularity was classified as not popular.
We found that pic-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.