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

enn-breadcrumb

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-breadcrumb

公共基础组件 面包屑组件

  • 0.0.2
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Breadcrumb

公共基础组件 面包屑组件

示例

<template>
  <Breadcrumb :breadcrumbs="breadcrumbs" />
</template>

<script>
import Breadcrumb from 'enn-breadcrumb';

export default {
  components: {
    Breadcrumb,
  },
  data() {
    return {
      breadcrumbs: [
        {
          name: 'test',
          label: 'test',
        },
      ],
    };
  },
}
</script>

API

Breadcrumb Attributes

参数类型必填默认值说明
breadcrumbsArray[{ label: '首页' }]面包屑的数据
homestring-首页跳转的 name
useHistoryboolean-使用 history API 跳转首页的链接
Tips
  • useHistory 主要用于微应用跳转至对应的首页

breadcrumbs Attributes

参数类型必填默认值说明
labelstring-面包屑项显示的文案
tostring-路由跳转对象,同 vue-router 的 to
namestring-路由跳转 name
hrefstring-使用 history 进行路由跳转
queryObject-路由跳转的参数
Tips
  • 其中 to 的优先级更高,设置了 to 之后将不读取 name 和 query。
配置函数

用于统一修改默认值,避免重复配置

事件名称参数说明
setDefaultHomehome 参数的默认值统一配置默认的 home
setDefaultUseHistoryuseHistory 参数的默认值统一配置默认的 useHistory

本地测试

npm install

Compiles and hot-reloads for development

npm run dev

Keywords

FAQs

Package last updated on 31 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