{"id":16962002,"url":"https://github.com/wangdahoo/antd-easy-form","last_synced_at":"2025-12-31T14:17:27.543Z","repository":{"id":42275408,"uuid":"259940881","full_name":"wangdahoo/antd-easy-form","owner":"wangdahoo","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-06T04:35:44.000Z","size":635,"stargazers_count":0,"open_issues_count":11,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T22:56:51.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangdahoo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-29T14:00:40.000Z","updated_at":"2020-11-20T14:23:33.000Z","dependencies_parsed_at":"2023-02-05T08:16:50.786Z","dependency_job_id":null,"html_url":"https://github.com/wangdahoo/antd-easy-form","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wangdahoo/antd-easy-form","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fantd-easy-form","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fantd-easy-form/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fantd-easy-form/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fantd-easy-form/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangdahoo","download_url":"https://codeload.github.com/wangdahoo/antd-easy-form/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangdahoo%2Fantd-easy-form/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265863793,"owners_count":23840888,"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-10-13T23:04:56.830Z","updated_at":"2025-12-31T14:17:27.515Z","avatar_url":"https://github.com/wangdahoo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# antd-easy-form\n\n\u003e Easy Form based on Ant Design\n\n## Usage\n\n```jsx\nimport React, { useState } from 'react'\nimport { Form, FormItemType } from '@antd-easy-form'\n\nconst registerFormItems = [\n    {\n        name: 'username',\n        itemType: FormItemType.INPUT,\n        labelText: '用户名',\n        required: true,\n        re: /^[A-Za-z\\d]{4,20}$/\n    },\n    {\n        name: 'password',\n        itemType: FormItemType.PASSWORD,\n        labelText: '密码',\n        defaultValue: '',\n        required: true,\n        re: /^[A-Za-z\\d_,.?/!@#$%^\u0026*()-=+~|\\\\]{4,20}$/,\n    },\n    {\n        name: 'password2',\n        itemType: FormItemType.PASSWORD,\n        labelText: '再次输入',\n        placeholder: '请再次输入密码',\n        defaultValue: '',\n        required: true,\n        re: /^[A-Za-z\\d_,.?/!@#$%^\u0026*()-=+~|\\\\]{4,20}$/,\n    },\n    {\n        name: 'gender',\n        itemType: FormItemType.RADIO,\n        labelText: '性别',\n        options: [\n            {\n                value: 1,\n                text: '男'\n            },\n            {\n                value: 0,\n                text: '女'\n            },\n        ],\n        buttonStyle: 'solid'\n    },\n    {\n        name: 'fruits',\n        itemType: FormItemType.CHECKBOX,\n        labelText: '喜爱的水果',\n        options: [\n            {\n                value: 'apple',\n                text: '苹果'\n            },\n            {\n                value: 'orange',\n                text: '橙子'\n            },\n            {\n                value: 'banana',\n                text: '香蕉'\n            },\n            {\n                value: 'grape',\n                text: '葡萄'\n            },\n        ]\n    },\n    {\n        name: 'memo',\n        itemType: FormItemType.TEXTAREA,\n        labelText: '个性签名',\n        defaultValue: '这个人很懒，什么也没留下'\n    },\n    {\n        name: 'city',\n        itemType: FormItemType.SELECT,\n        labelText: '城市',\n        options: [\n            {\n                value: '上海',\n                text: '上海',\n            },\n            {\n                value: '北京',\n                text: '北京',\n            }\n        ]\n    },\n    {\n        name: 'salay',\n        itemType: FormItemType.NUMBER,\n        labelText: '收入水平',\n        unit: '万元',\n        min: 1,\n        max: 100,\n        defaultValue: 10\n    },\n]\n\nexport default function App (props) {\n    return (\n        \u003cdiv style={{ width: 600, margin: '20px auto' }}\u003e\n            \u003cForm\n                items={registerFormItems}\n                labelAlign={'left'}\n                labelWidth={120}\n                onSubmit={console.log}\n            /\u003e\n        \u003c/div\u003e\n    )\n}\n```\n\n### FormItem Reference\n\n[here](https://github.com/wangdahoo/antd-easy-form/blob/master/src/types.ts)\n\n\n### TODOs\n\n- [x] Custom Form Item\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangdahoo%2Fantd-easy-form","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangdahoo%2Fantd-easy-form","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangdahoo%2Fantd-easy-form/lists"}