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

loop-menus

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loop-menus

> 作者: 西瓜汁

  • 1.0.0
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

递归菜单插件

作者: 西瓜汁

循环递归菜单Menus

安装

npm i loop-menus -s

在 vue 项目的入口文件 min.js 写入以下代码

import LoopMenus from 'loop-menus'
vue.use(LoopMenus)

在组件中使用

参数

Menu 组件接收 以下几个参数

menusData  // Array 格式见下方 data
defautChildrenName // String 子菜单的key名  不传默认为 chidlren
defautTitleName  // String 标题名  不传默认为 title

数据格式

data: [

​ {title:"一级菜单1"},

​ {title:"一级菜单2", children:[ {title:"二级菜单1"} ...] },

​ ...

]

FAQs

Package last updated on 02 Mar 2022

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