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.
enn-navigation-bar
Advanced tools
公共基础组件 导航栏组件
npm 地址:https://www.npmjs.com/package/enn-navigation-bar
<template>
<Nav
title="XXX 网络管理平台"
:user="user"
:isLogged="isLogged"
@onLogin="onLogin"
@onLogout="onLogout"
/>
</template>
<script>
import Nav from 'enn-navigation-bar';
export default {
components: {
Nav,
},
data() {
return {
user: {},
isLogged: false,
};
},
methods: {
onLogin() {
this.user = {
username: 'username',
nickname: 'nickname',
email: 'email@gmail.com',
phone: '13512345678',
};
this.isLogged = true;
console.log('onLogin');
},
onLogout() {
this.user = {};
this.isLogged = false;
console.log('onLogout');
},
},
};
</script>
<style>
html,
body {
margin: 0;
padding: 0;
}
</style>
<el-header style="height: 52px; padding: 0">
<Nav :user="user" :isLogged="isLogged" @onLogin="onLogin" @onLogout="onLogout" />
</el-header>
参数 | 类型 | 必填 | 默认值 | 说明 |
---|---|---|---|---|
logo | string | - | logo 图片链接 | |
logoHref | string | - | 点击 logo 跳转的链接 | |
title | string | - | 页面标题 | |
user | Object | 是 | - | 用户信息 |
isLogged | Boolean | 是 | false | 是否已登录 |
options | Array | - | hover 显示的用户信息及相关操作 |
事件名称 | 说明 | 回调参数 |
---|---|---|
onLogin | 登录按钮触发事件 | - |
onLogout | 登出按钮触发事件 | - |
参数 | 类型 | 必填 | 默认值 | 说明 |
---|---|---|---|---|
avatar | string | - | 用户头像图片链接 | |
username | string | - | 用户名 |
参数 | 类型 | 必填 | 默认值 | 说明 |
---|---|---|---|---|
label | string | - | 显示的文案 | |
name | string | - | 使用 router 进行跳转的 name | |
href | string | - | 如果为 https:// 或 http:// 或 // 开头,使用 window.open 打开该链接。否则使用 history.pushState 进行跳转 | |
query | Object | - | 链接参数 | |
handler | Function | - | 手动处理点击事件的回调函数,参数为该项的值 |
插槽名称 | 绑定值 | 作用 |
---|---|---|
centerSlot | 中间空白部分的插槽 |
<Nav
title="XXX 网络管理平台"
@onLogin="onLogin"
@onLogout="onLogout"
>
<template #centerSlot>centerSlot</template>
</Nav>
FAQs
公共基础组件 导航栏组件
The npm package enn-navigation-bar receives a total of 1 weekly downloads. As such, enn-navigation-bar popularity was classified as not popular.
We found that enn-navigation-bar 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.