bee-menus
menus ui component for react
Last updated 2 months ago by tinper-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bee-menus 
SYNC missed versions from official npm registry.

bee-menus

npm version Build Status devDependency Status

react bee-menus component for tinper-bee

some description...

使用方法


API

Menu

参数 说明 类型 默认值
className 自定义类名 string -
theme 主题颜色 String: light dark -
mode 菜单类型,现在支持垂直、水平、和内嵌模式三种 String: vertical horizontal inline vertical
selectedKeys 当前选中的菜单项 key 数组 Array -
defaultSelectedKeys 初始选中的菜单项 key 数组 Array -
openKeys 当前展开的 SubMenu 菜单项 key 数组 Array -
defaultOpenKeys 初始展开的 SubMenu 菜单项 key 数组 -
onOpenChange SubMenu 展开/关闭的回调 Function(openKeys: string[]) noop
onSelect 被选中时调 Function({ item, key, selectedKeys }) -
onDeselect 取消选中时调用,仅在 multiple 生效 Function({ item, key, selectedKeys }) -
onClick 点击 menuitem 调用此函数,参数为 {item, key, keyPath} function -
style 根节点样式 Object -
keyboard 是否使用键盘操作 bool false
tabIndex 设置tabIndex string 0
Children MenuItem组件/SubMenu组件/MenuItemGroup组件 node -

Menu.Item

参数 说明 类型 默认值
disabled 是否禁用 Boolean false
key item 的唯一标志 String -

Menu.SubMenu

参数 说明 类型 默认值
disabled 是否禁用 Boolean false
key 唯一标志 String
title 子菜单项值 String or React.Element
children 子菜单的菜单项 (MenuItem or SubMenu)[]
onTitleClick 点击子菜单标题 Function({ eventKey, domEvent })
disabled 是否禁用 Boolean false
key item 的唯一标志 String -
Children MenuItem组件/SubMenu组件/MenuItemGroup组件 node -

已支持的键盘操作

注意:目前支持两种写法,参考示例7和示例8

按键 功能
↑(上箭) 切换选项
↓(下箭) 切换选项
←(左箭) 关闭下级菜单
→(右箭) 打开下级菜单
enter 选中

开发调试

$ git clone https://github.com/tinper-bee/bee-menus
$ cd bee-menus
$ npm install
$ npm run dev

Current Tags

  • 2.0.10-alpha.1                                ...           alpha (a year ago)
  • 2.0.14                                ...           latest (2 months ago)

46 Versions

  • 2.0.14                                ...           2 months ago
  • 2.0.13                                ...           6 months ago
  • 2.0.12                                ...           10 months ago
  • 2.0.11                                ...           a year ago
  • 2.0.10-alpha.1                                ...           a year ago
  • 2.0.10                                ...           a year ago
  • 2.0.10-alpha.0                                ...           a year ago
  • 2.0.9                                ...           a year ago
  • 2.0.8-alpha.0                                ...           a year ago
  • 2.0.8                                ...           a year ago
  • 2.0.7                                ...           a year ago
  • 2.0.7-alpha.0                                ...           a year ago
  • 2.0.6                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 1.0.11                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.9-beta3                                ...           2 years ago
  • 1.0.9-beta2                                ...           2 years ago
  • 1.0.9-beta                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.1.14                                ...           3 years ago
  • 0.1.13                                ...           3 years ago
  • 0.1.12                                ...           3 years ago
  • 0.1.11                                ...           3 years ago
  • 0.1.10                                ...           3 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago

Copyright 2014 - 2017 © taobao.org |