https://github.com/future-team/eg-drop-down
:dolphin:基于react开发的pc端下拉菜单组件
https://github.com/future-team/eg-drop-down
Last synced: 1 day ago
JSON representation
:dolphin:基于react开发的pc端下拉菜单组件
- Host: GitHub
- URL: https://github.com/future-team/eg-drop-down
- Owner: future-team
- License: mit
- Created: 2016-05-26T07:30:20.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-16T03:18:26.000Z (about 10 years ago)
- Last Synced: 2025-02-06T18:56:12.672Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 485 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# eg-drop-down
>使用react构建pc端应用的下拉菜单解决方案,配合eagle-ui将使界面和功能更完善
>DropDownMenu 渲染单层下拉列表
>DropDownSelect 渲染单层下拉单选框
>DropDownSuggestion 渲染联想词下拉框
> MultiDropDownMenu has removed to eg-drop-tree ,use npm install eg-drop-tree instead
---
## code example(代码示例)
``` javascript
import {DropDownMenu, DropDownSelect,DropDownSuggestion} from "../../src/index.js";//联想功能组件
export default class IndexModule extends Component {
constructor(props,context){
super(props,context);
}
render(){
var bu = [
{id: 1,name: "交易后台"},
{id: 2,name: "结婚1"}];
let menuData=[
{ data:'近一个周的问题',callback:()=>{alert('clicked')}},
{ data:'近一个月的问题',callback:()=>{alert('clicked')}},
{ data:'一个月之前的问题',callback:()=>{alert('clicked')}}];
return (
{this.getDropDownData("DropDownSelect")}}>点击获得下拉选择框的选择数据
{this.getDropDownData('DropDownSuggestion')}}>点击获取下拉联想框的选择数据
);
}
getDropDownData(type){
alert(JSON.stringify(this.refs[type].formData));
}
}
render(,document.getElementById('root'));
```
## UI展示
>普通下拉单选和展示

## instructions[使用方式]
> 请参考example/src/index.js文件
## download(下载)
``` bash
#usage
npm install eg-drop-down
#demo
npm run demo
```