Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enn-navigation-bar

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enn-navigation-bar

公共基础组件 导航栏组件

  • 0.0.2
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

NavigationBar

公共基础组件 导航栏组件

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>

API

NavigationBar Attributes

参数类型必填默认值说明
logostring-logo 图片链接
logoHrefstring-点击 logo 跳转的链接
titlestring-页面标题
userObject-用户信息
isLoggedBooleanfalse是否已登录
bgColorstring#ffffff导航栏背景颜色
colorstring#333333用户信息字体颜色

NavigationBar Events

事件名称说明回调参数
onLogin登录按钮触发事件-
onLogout登出按钮触发事件-

user Attributes

参数类型必填默认值说明
avatarstring-用户头像图片链接
usernamestring-用户名
nicknamestring-用户昵称(姓名)
emailstring-邮箱
phonestring-手机号

本地测试

npm install

Compiles and hot-reloads for development

npm run dev

FAQs

Package last updated on 30 Aug 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc