{"id":19345551,"url":"https://github.com/future-team/ph-filter","last_synced_at":"2026-06-15T03:31:41.823Z","repository":{"id":57322743,"uuid":"62878058","full_name":"future-team/ph-filter","owner":"future-team","description":"下拉筛选组件（app端，基于phoenix-ui的组件）","archived":false,"fork":false,"pushed_at":"2017-10-30T08:00:13.000Z","size":327,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-09-21T07:47:36.025Z","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-07-08T09:43:41.000Z","updated_at":"2016-07-09T11:03:08.000Z","dependencies_parsed_at":"2022-08-25T21:00:53.791Z","dependency_job_id":null,"html_url":"https://github.com/future-team/ph-filter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/future-team/ph-filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Fph-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Fph-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Fph-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Fph-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-team","download_url":"https://codeload.github.com/future-team/ph-filter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Fph-filter/sbom","scorecard":{"id":414726,"data":{"date":"2025-08-11","repo":{"name":"github.com/future-team/ph-filter","commit":"f0b57d521441eed1251e85047422a09e51ede0d0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 3/11 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-MIT:0","Info: FSF or OSI recognized license: MIT License: LICENSE-MIT:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T23:32:36.750Z","repository_id":57322743,"created_at":"2025-08-18T23:32:36.750Z","updated_at":"2025-08-18T23:32:36.750Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34346867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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:00.476Z","updated_at":"2026-06-15T03:31:41.806Z","avatar_url":"https://github.com/future-team.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ph-filter\n\nFilter 使用方法\n```jsx\n    \u003cFilterContainer onChange={function(key){console.log(key);}}\u003e\n        \u003cPanel selected={{key:'s_flower',value:'花店'}}\u003e\n            \u003cItemGroup label={\u003cspan style={{color:'red'}}\u003e美食\u003c/span\u003e}\u003e\n                \u003cItem itemKey='f_all'\u003e\n                    \u003cspan style={{color:'red'}}\u003e全部美食\u003c/span\u003e\n                \u003c/Item\u003e\n                \u003cItem itemKey='f_bbc'\u003e\n                    本帮江浙菜\n                \u003c/Item\u003e\n                \u003cItem itemKey='f_jp'\u003e\n                    日本菜\n                \u003c/Item\u003e\n                \u003cItem itemKey='f_cf'\u003e\n                    咖啡厅\n                \u003c/Item\u003e\n            \u003c/ItemGroup\u003e\n            \u003cItemGroup  label='电影'\u003e\n                \u003cItem itemKey='m_all'\u003e\n                    全部电影\n                \u003c/Item\u003e\n                \u003cItem itemKey='m_p'\u003e\n                    私人影院\n                \u003c/Item\u003e\n                \u003cItem itemKey='m_c'\u003e\n                    电影院\n                \u003c/Item\u003e\n            \u003c/ItemGroup\u003e\n            \u003cItemGroup label='购物'\u003e\n                \u003cItem itemKey='s_all'\u003e\n                    全部购物\n                \u003c/Item\u003e\n                \u003cItem itemKey='s_shoes'\u003e\n                    服饰鞋包\n                \u003c/Item\u003e\n                \u003cItem itemKey='s_medicine'\u003e\n                    药店\n                \u003c/Item\u003e\n                \u003cItem itemKey='s_glasses'\u003e\n                    眼镜店\n                \u003c/Item\u003e\n                \u003cItem itemKey='s_flower'\u003e\n                    花店\n                \u003c/Item\u003e\n            \u003c/ItemGroup\u003e\n        \u003c/Panel\u003e\n        \u003cPanelSimple default='筛选'\u003e\n            \u003cItem itemKey=\"sjgy\"\u003e世纪公园\u003c/Item\u003e\n            \u003cItem itemKey=\"ljz\"\u003e陆家嘴\u003c/Item\u003e\n            \u003cItem itemKey=\"bbb\"\u003e八佰伴\u003c/Item\u003e\n            \u003cItem itemKey=\"pdxq\"\u003e浦东新区\u003c/Item\u003e\n        \u003c/PanelSimple\u003e\n    \u003c/FilterContainer\u003e\n```\n\nFilterCheckbox 拓展组件用法\n```jsx\n    ...\n    onSubmit(data){\n        console.log(data);\n    }\n    ...\n    const chooseData = \"3244945,13893492,5687880,18418332,6210703,24890244\"; // string\n    const filterData = shopList.msg.cityShopList;\n\n    return(\n        \u003cFilterCheckbox choose={chooseData} groupIndex={0} buttonText='确定' buttonStyle=\"info\" onSubmit={::this.onSubmit}\u003e\n            {\n                filterData.map((cityShopList,index)=\u003e{\n                    return (\n                        \u003cItemGroup key={cityShopList.cityId} mainKey={cityShopList.cityId} label={cityShopList.cityName}\u003e\n                            {\n                                cityShopList.shopInfoDTOList.map((shopInfo)=\u003e{\n                                    return (\n                                        \u003cItem disabled={shopInfo.status==1} key={shopInfo.shopId} itemKey={shopInfo.shopId}\u003e{shopInfo.shopName}\u003c/Item\u003e\n                                    );\n                                })\n                            }\n                        \u003c/ItemGroup\u003e\n                    );\n                })\n            }\n            \n        \u003c/FilterCheckbox\u003e\n    )\n```\n\n##  注意事项\n\t\n- \t目前支持两种Panel，一级选择：PanelSimple  和  二级选择：Panel\n-   Panel全部嵌套在FilterContainer里，有几个panel，cat栏目就会被几等分\n-   当使用Panel时，即表明该Panel是个二级选择Panel，所有的二级分类都会被ItemGroup标签包裹，itemGroup用于切换二级分类列表\n\t\t\t\n\t\t\t\n##  API\nView [example](/example/src/index.js) to get more details\n\n#### `\u003cFilterContainer\u003e` Props:\n- onChange 用户切换分类的时候触发的回调函数，输入参数是分类的key .\n- hideCat 当设置hideCat属性的时候，cat那一栏会隐藏，第一个panel会一直显示（适用于只有一个panel并且不需要cat的场景）\n\n#### `\u003cPanelSimple\u003e`和 `\u003cPanel\u003e` Props:\n- default 当用户没有选择任何分类的时候，cat栏目里显示的默认文案 .\n- readOnly 是否为只读模式 .\n- selected 用户选择的分类对象，必须包含key和value属性{key:'s_flower',value:'花店'}，用于高亮panel里对应的项.\n\n#### `\u003cItem\u003e` Props:\n- itemKey item的唯一标识，必填参数 .\n\n#### `\u003cItemGroup\u003e` Props:\n- label 一级分类的显示文案，用于包裹二级分类列表，可以是string，也可以是react标签 .\n\n\n### Contributing\n\n- Fork the project\n- Run the project in development view demo: `$ npm run demo`\n- Make changes.\n- Add appropriate tests\n- `$ npm run test`\n- If tests don't pass, make them pass.\n- Update README with appropriate docs.\n- Rnn build\n- `$ npm run build`\n- Commit and PR.\n\n## Repair\n\n`version 1.0.2` 增加choose的数据是通过请求获取的情况兼容 \u003cbr/\u003e\n`version 1.0.1` 修复没有choose时数据多一个逗号的问题 \u003cbr/\u003e\n`version 1.0.0` 新增FilterCheckbox拓展组件 \u003cbr/\u003e\n`version 1.0.4` FilterCheckbox右边栏可横向滚动 \u003cbr/\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-team%2Fph-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-team%2Fph-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-team%2Fph-filter/lists"}