
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
bee-dropdown
Advanced tools
![]() | ![]() | ![]() | ![]() | ![]() |
|---|---|---|---|---|
| IE 9+ ✔ | Chrome 31.0+ ✔ | Firefox 31.0+ ✔ | Opera 30.0+ ✔ | Safari 7.0+ ✔ |
下拉列表组件
先进行下载bee-button包
npm install --save bee-dropdown
import Dropdown from 'bee-dropdown';
import Button from 'bee-button';
import Menu, { MenuItem } from 'bee-menus';
class Demo extends Component {
render () {
const menu = (
<Menu multiple>
<MenuItem key="1">借款合同</MenuItem>
<MenuItem key="2">抵/质押合同</MenuItem>
<MenuItem key="3">担保合同</MenuItem>
<MenuItem key="4">联保合同</MenuItem>
<MenuItem key="5">合同审批</MenuItem>
<MenuItem key="6">抵/质押合同跟踪</MenuItem>
</Menu>
);
return (
<Dropdown
trigger={['click']}
overlay={menu}
animation="slide-up">
<Button colors='primary'>点击显示</Button>
</Dropdown>
)
}
}
<link rel="stylesheet" href="./node_modules/bee-dropdown/build/Dropdown.css">
import "./node_modules/bee-dropdown/src/Dropdown.scss"
//或是
import "./node_modules/bee-dropdown/build/Dropdown.css"
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| transitionName | 下拉显示动画 | - | - |
| trigger | 触发的事件数组 | array | ['hover'] |
| placement | 触发的位置 | 支持bottomLeft/bottomCenter/bottomRight/topLeft/topCenter/topRight | 'bottomLeft' |
| overlay | 要显示的菜单 | element/reactComponent | - |
| animation | 触发时的动画 | string | - |
| overlayClassName | 传递给弹出菜单的className | string | '' |
| align | 对齐方式 | object | {} |
| overlayStyle | 传递给弹出菜单的style | object | {} |
| onVisibleChange | 下拉菜单显示与否的钩子函数 | function | () => {} |
| showAction | 显示时的钩子函数数组 | array | [] |
| hideAction | 隐藏时的钩子函数数组 | array | [] |
| getPopupContainer | 获取要添加的容器 | function | 默认是body |
| getDocument | 点击隐藏的容器,适用于出现iframe的情况 | function | document |
| disabled | 是否禁用 | bool | false |
| delay | 延迟显示隐藏时间,单位毫秒 | number | - |
| delayShow | 延迟显示时间,单位毫秒 | number | - |
| delayHide | 延迟隐藏时间,单位毫秒 | number | - |
| minOverlayWidthMatchTrigger | 是否设置下拉的最小宽度 | bool | true |
$ npm install -g bee-tools
$ git clone https://github.com/tinper-bee/bee-dropdown
$ cd bee-dropdown
$ npm install
$ npm run dev
FAQs
dropdown ui component for react
The npm package bee-dropdown receives a total of 338 weekly downloads. As such, bee-dropdown popularity was classified as not popular.
We found that bee-dropdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 17 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.