{"id":19345579,"url":"https://github.com/future-team/eg-drop-tree","last_synced_at":"2025-10-09T07:04:18.265Z","repository":{"id":57220271,"uuid":"61256734","full_name":"future-team/eg-drop-tree","owner":"future-team","description":"树状层级下拉菜单组件，支持层级勾选","archived":false,"fork":false,"pushed_at":"2017-06-26T07:22:32.000Z","size":449,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-15T14:49:57.010Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/future-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-16T02:44:53.000Z","updated_at":"2017-10-10T02:05:00.000Z","dependencies_parsed_at":"2022-08-29T00:11:59.193Z","dependency_job_id":null,"html_url":"https://github.com/future-team/eg-drop-tree","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-drop-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-drop-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-drop-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-drop-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-team","download_url":"https://codeload.github.com/future-team/eg-drop-tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372465,"owners_count":21419719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T04:07:09.260Z","updated_at":"2025-10-09T07:04:13.231Z","avatar_url":"https://github.com/future-team.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eg-drop-tree\n\n\u003e使用react构建pc端应用的下拉菜单解决方案，配合eagle-ui将使界面和功能更完善\n\n\u003e MultiDropDown渲染树状层级勾选框，可支持无限层级,仅仅依赖简单的数据结构\n \n\n## code example(代码示例)\n\n``` javascript\n\n    import React, { Component ,PropTypes} from 'react';\n    import {render} from 'react/lib/ReactDOM';\n    require('./public.less');\n    import MultiDropDown from \"../../src/index.js\";//联想功能组件\n    export default class IndexModule extends Component {\n        constructor(props,context){\n            super(props,context);\n        }\n        render(){\n            let mockMultiDropData=[\n                {\n                    \"typeName\": \"第1.0级\",\n                    \"children\": [\n                        {\n                            \"typeName\": \"第2.0级\",\n                            \"children\": [\n                                {\n                                \"typeName\": \"第3.0级\",\n                                \"children\": [ ],\n                                \"leaf\":true\n                                },\n                                {\n                                    \"typeName\":\"第3.1级\",\n                                    \"children\": [{\n                                        \"typeName\":\"第4.0级\",\n                                        \"children\": [\n                                            {\n                                                \"typeName\":\"第5.0级\",\n                                                \"children\": [ ],\n                                                \"leaf\":true\n                                            },\n                                            {\n                                                \"typeName\": \"第5.1级\",\n                                                \"children\": [ ]\n                                            },\n                                            {\n                                                \"typeName\": \"第5.2级\",\n                                                \"children\": [ ],\n                                                \"leaf\":true\n                                            }]\n                                        },\n                                        {\n                                            \"typeName\": \"第4.2级\",\n                                            \"children\": [ ]\n                                        },\n                                        {\n                                            \"typeName\": \"第4.3级\",\n                                            \"children\": [ ],\n                                            \"leaf\":true\n                                        }]\n                                },\n                                {\n                                    \"typeName\": \"第3.2级\",\n                                    \"children\": [ ]\n                                },\n                                {\n                                    \"typeName\": \"第3.3级\",\n                                    \"children\": [ ],\n                                    \"leaf\":true\n                                }\n                            ]\n                        },\n                        {\n                            \"typeName\": \"第2.1级\",\n                            \"children\": [ ],\n                            \"leaf\":true\n                        }\n                    ]\n                },\n                {\n                    \"typeName\": \"第1.0=级\",\n                    \"children\": [\n                        {\n                            \"typeName\":\"第2.0=级\",\n                            \"children\": [\n                                {\n                                    \"typeName\": \"3.0=级\",\n                                    \"children\": [ ],\n                                    \"leaf\":true\n                                }\n                            ]\n                        }\n                    ]\n                }\n            ];\n            var bu = [\n                {id: 1,name: \"交易后台\"},\n                {id: 2,name: \"结婚1\"}];\n            let menuData=[\n                { data:'近一个周的问题',callback:()=\u003e{alert('clicked')}},\n                { data:'近一个月的问题',callback:()=\u003e{alert('clicked')}},\n                { data:'一个月之前的问题',callback:()=\u003e{alert('clicked')}}];\n    \n            return (\n                \u003cdiv className=\"paddingSpace\"\u003e\n    \n                    \u003cdiv style={{fontSize:'12px',display:'inline-block',width:'200px'}}\u003e\n                        \u003cMultiDropDown dropDownData={mockMultiDropData} keyName='typeName' leafName='leaf' title=\"树状列表选择\" ref=\"MultiDropDown\"/\u003e\n                    \u003c/div\u003e\n    \n                    \u003cdiv className='demo-button-container'\u003e\n                        \u003cdiv className='demo-button' style={{background:'red'}} onClick={()=\u003e{this.getDropDownData('MultiDropDown')}}\u003e点击获取树状列表的选择结果\u003c/div\u003e\u003c/div\u003e\n                \u003c/div\u003e\n            );\n        }\n        getDropDownData(type){\n            alert(JSON.stringify(this.refs[type].formData));\n        }\n    }\n    render(\u003cIndexModule/\u003e,document.getElementById('root'));\n\n```\n## UI展示\n\u003e树状下拉选项图\n![树状下拉选项图](/assets/eg-drop-tree.png)\n\n## instructions[使用方式]\n\u003e 请参考example/src/index.js文件\n\n## download(下载)\n\n```\tbash\n    #usage\n        npm install eg-drop-tree\n\t#demo\n\t    npm run demo\t\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-team%2Feg-drop-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-team%2Feg-drop-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-team%2Feg-drop-tree/lists"}