Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
enn-navigation-bar
Advanced tools
公共基础组件 导航栏组件
npm 地址:https://www.npmjs.com/package/enn-navigation-bar
<template>
<Nav
title="LoRaWAN 网络管理平台"
: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>
参数 | 类型 | 必填 | 默认值 | 说明 |
---|---|---|---|---|
logo | string | - | logo 图片链接 | |
logoHref | string | - | 点击 logo 跳转的链接 | |
title | string | - | 页面标题 | |
user | Object | 是 | - | 用户信息 |
isLogged | Boolean | 是 | false | 是否已登录 |
bgColor | string | #ffffff | 导航栏背景颜色 | |
color | string | #333333 | 用户信息字体颜色 |
事件名称 | 说明 | 回调参数 |
---|---|---|
onLogin | 登录按钮触发事件 | - |
onLogout | 登出按钮触发事件 | - |
参数 | 类型 | 必填 | 默认值 | 说明 |
---|---|---|---|---|
avatar | string | - | 用户头像图片链接 | |
username | string | - | 用户名 | |
nickname | string | - | 用户昵称(姓名) | |
string | - | 邮箱 | ||
phone | string | - | 手机号 |
npm install
npm run dev
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.