An open API service indexing awesome lists of open source software.

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端下拉菜单组件

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展示

>普通下拉单选和展示
![普通下拉单选和展示](/assets/eg-drop-down-demo.png)

## instructions[使用方式]
> 请参考example/src/index.js文件

## download(下载)

``` bash
#usage
npm install eg-drop-down
#demo
npm run demo
```