{"id":39149621,"url":"https://github.com/duan602728596/antd-schema-form","last_synced_at":"2026-01-17T21:38:37.116Z","repository":{"id":37431307,"uuid":"158244494","full_name":"duan602728596/antd-schema-form","owner":"duan602728596","description":"Based on Ant Design, interactive forms can be generated through JSON Schema configuration.  - 基于Ant Design，可以通过JSON Schema配置生成可交互的表单。","archived":false,"fork":false,"pushed_at":"2025-01-22T07:32:51.000Z","size":28781,"stargazers_count":172,"open_issues_count":9,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-08T21:19:36.191Z","etag":null,"topics":["ant","ant-design","antd","form","react-component"],"latest_commit_sha":null,"homepage":"https://duan602728596.github.io/antd-schema-form/#/","language":"TypeScript","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/duan602728596.png","metadata":{"files":{"readme":"README-zhCN.md","changelog":"CHANGELOG-zhCN.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-19T15:13:18.000Z","updated_at":"2025-08-07T12:23:21.000Z","dependencies_parsed_at":"2024-03-15T09:30:40.600Z","dependency_job_id":"937930b7-3899-49bc-9e64-6aef4db54436","html_url":"https://github.com/duan602728596/antd-schema-form","commit_stats":{"total_commits":504,"total_committers":3,"mean_commits":168.0,"dds":0.007936507936507908,"last_synced_commit":"4869d8e0f749c39831dcd5ab20d06c2c8b32a9c4"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"purl":"pkg:github/duan602728596/antd-schema-form","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duan602728596%2Fantd-schema-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duan602728596%2Fantd-schema-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duan602728596%2Fantd-schema-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duan602728596%2Fantd-schema-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duan602728596","download_url":"https://codeload.github.com/duan602728596/antd-schema-form/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duan602728596%2Fantd-schema-form/sbom","scorecard":{"id":358790,"data":{"date":"2025-08-11","repo":{"name":"github.com/duan602728596/antd-schema-form","commit":"d002df7ad93ab9b58a0bd58829e90a5233485fa2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'","Warn: branch protection not enabled for branch 'v2'"],"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"}}]},"last_synced_at":"2025-08-18T10:16:05.289Z","repository_id":37431307,"created_at":"2025-08-18T10:16:05.290Z","updated_at":"2025-08-18T10:16:05.290Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28518648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T18:55:29.170Z","status":"ssl_error","status_checked_at":"2026-01-17T18:55:03.375Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ant","ant-design","antd","form","react-component"],"created_at":"2026-01-17T21:38:36.362Z","updated_at":"2026-01-17T21:38:37.043Z","avatar_url":"https://github.com/duan602728596.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# antd-schema-form\n\n[![NPM version][antd-schema-form-image]][antd-schema-form-url]\n[![NPM version][react-image]][react-url]\n[![NPM version][react-dom-image]][react-dom-url]\n[![NPM version][ant-design-image]][ant-design-url]\n\n[antd-schema-form-image]: https://img.shields.io/npm/v/antd-schema-form.svg\n[antd-schema-form-url]: https://www.npmjs.com/package/antd-schema-form\n\n[react-image]: https://img.shields.io/badge/react-%3E=16.7.0-red.svg\n[react-url]: https://github.com/facebook/react\n\n[react-dom-image]: https://img.shields.io/badge/react--dom-%3E=16.7.0-red.svg\n[react-dom-url]: https://github.com/facebook/react\n\n[ant-design-image]: https://img.shields.io/badge/ant--design-%3E=5-red.svg\n[ant-design-url]: https://github.com/ant-design/ant-design\n\nantd-schema-form基于[Ant Design](https://ant.design/)，可以通过[JSON Schema](http://json-schema.org/draft-07/json-schema-validation.html)配置快速生成可交互的表单。   \n\n这个[Demo](https://duan602728596.github.io/antd-schema-form/#/)简单的展示了通过配置schema.json构建一个表单。\n\n## 开始使用\n\n1. React的版本`\u003e=16.7.0`。\n2. 组件的使用:\n\n  ```javascript\n  import React, { Component } from 'react';\n  import ReactDOM from 'react-dom';\n  import SchemaForm, {\n    getKeysFromObject,  // 获取schema.json下所有的key\n    getObjectFromValue, // object对象，格式化成表单需要的值\n    getValueFromObject  // 从form获取到的表单的值，格式化成object对象\n  } from 'antd-schema-form';\n  import 'antd-schema-form/style/antd-schema-form.css'; // 引入样式\n\n  // json schema\n  const json = {\n    id: '$root',\n    type: 'object',\n    title: '$root',\n    properties: {}\n  };\n\n  ReactDOM.render(\n    \u003cSchemaForm json={ json } /\u003e,\n    document.getElementById('app')\n  );\n  ```\n\n## API\n\n| 参数              | 说明                                                            | 类型                   |\n| ---               | ---                                                             | ---                    |\n| json              | json schema，必需                                               | object                 |\n| value             | 表单的值                                                        | object                 |\n| onOk              | 表单的确认事件                                                  | (form: object, value: object, keys: Array\u0026lt;string\u0026gt;) =\u003e void |\n| onCancel          | 表单的取消事件                                                  | (form: object, keys: Array\u0026lt;string\u0026gt;) =\u003e void |\n| okText            | 确认按钮文字                                                    | string                 |\n| cancelText        | 取消按钮文字                                                    | string                 |\n| footer            | 自定义底部内容，onOk事件[参考](https://github.com/duan602728596/antd-schema-form/blob/master/src/components/FormObject/FormObject.tsx#L143) | (form: object) =\u003e React.Node |\n| customComponent   | 自定义渲染组件，[参考](docs/custom_rendering_component-zhCN.md) | object                 |\n| customTableRender | 自定义表格列渲染组件，[参考](docs/custom_rendering_component-zhCN.md#自定义表格列渲染组件) | object                 |\n| languagePack      | 语言配置，[参考](language/zh-CN.json)                           | object                 |\n| formOptions       | `Form`的参数，[参考](https://ant.design/components/form-cn/#Form) | object                 |\n\n## [json schema配置](docs/json_schema_configuration-zhCN.md)\n\n## [自定义渲染组件](docs/custom_rendering_component-zhCN.md)\n\n## [按需加载组件](docs/load_components_as_needed-zhCN.md)\n\n## 开发和测试\n\n* 运行命令`npm run dev`，在浏览器中输入`http://127.0.0.1:5050`查看demo并开发。\n* 运行命令`npm run build`和`npm run test`，在浏览器中输入`http://127.0.0.1:6060`运行测试用例。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduan602728596%2Fantd-schema-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduan602728596%2Fantd-schema-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduan602728596%2Fantd-schema-form/lists"}