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.
一个基于 vue2.x 版本的抽屉组件,API 跟 element-ui 保持一致。
在 main.js 中写入以下内容:
import Vue from "vue";
import ElDrawer from "el-drawer";
Vue.use(ElDrawer);
在 vue 文件中使用:
<template>
<div>
<button @click="visible = true">打开弹窗</button>
<el-drawer title="我是标题" :visible.sync="visible" :direction="direction">
<span>我是弹窗的内容!</span>
</el-drawer>
</div>
</template>
<script>
export default {
data() {
return {
visible: false,
direction: "rtl"
};
}
};
</script>
由于关闭按钮使用了 icon,需要引入字体文件,在 node_modules 文件夹找到 el-drawer, 将 lib 文件夹内的 fonts 文件夹拷贝到项目的 public 或者 static 目录即可
原因如下:
@font-face {
font-family: element-icons;
src: url(fonts/element-icons.woff) format("woff"), url(fonts/element-icons.ttf)
format("truetype");
font-weight: 400;
font-display: "auto";
font-style: normal;
}
FAQs
A vue drawer component
We found that el-drawer 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.
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.