https://github.com/lx544690189/react-menu
react右键菜单,contextMenu
https://github.com/lx544690189/react-menu
contextmenu react
Last synced: 3 months ago
JSON representation
react右键菜单,contextMenu
- Host: GitHub
- URL: https://github.com/lx544690189/react-menu
- Owner: lx544690189
- Created: 2018-08-21T03:09:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-26T09:41:20.000Z (over 6 years ago)
- Last Synced: 2025-02-28T14:08:20.241Z (4 months ago)
- Topics: contextmenu, react
- Language: TypeScript
- Homepage: https://github.com/lx544690189/react-menu
- Size: 9.69 MB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# scorpio-menu
[](https://www.npmjs.com/package/scorpio-menu)### [查看demo](https://lx544690189.github.io/react-menu/)
## 介绍
基于react的右键菜单## 安装
```sh
npm i scorpio-menu
```## Attributes
参数 | 类型 | 默认值 | 说明
---|---|---|---
data | object[] | - | 菜单数据,看下面详情
show | boolean | false | 显示/隐藏
onClose | Function(e: React.MouseEvent) | - | 隐藏按钮时的回调(点击非按钮区域)
onMenuClick | Function(d: data) | - | 点击某一选中菜单的回调,回调参数为菜单data数据## data对象
key | 说明
---|---
label | 菜单显示名称
disabled | 是否禁用
subMenu | 子菜单object