{"id":25386347,"url":"https://github.com/howiefh/input-group","last_synced_at":"2025-06-22T18:33:24.881Z","repository":{"id":141990138,"uuid":"72978826","full_name":"howiefh/input-group","owner":"howiefh","description":"Input Group","archived":false,"fork":false,"pushed_at":"2019-07-18T02:50:36.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T18:02:53.735Z","etag":null,"topics":["input-group"],"latest_commit_sha":null,"homepage":"https://howiefh.github.io/input-group/","language":"JavaScript","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/howiefh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-06T09:37:59.000Z","updated_at":"2019-07-18T02:50:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"8e6ff1ca-9134-4091-8c9f-acc59197d53d","html_url":"https://github.com/howiefh/input-group","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/howiefh/input-group","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howiefh%2Finput-group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howiefh%2Finput-group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howiefh%2Finput-group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howiefh%2Finput-group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/howiefh","download_url":"https://codeload.github.com/howiefh/input-group/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/howiefh%2Finput-group/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261343660,"owners_count":23144716,"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":["input-group"],"created_at":"2025-02-15T10:33:56.908Z","updated_at":"2025-06-22T18:33:19.853Z","avatar_url":"https://github.com/howiefh.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 输入框组\n\n简单实现了一组输入框动态增减，配合[jQuery Validation Plugin](https://jqueryvalidation.org/)可以很方便的实现校验。\n\n[demo](https://howiefh.github.io/input-group/demo.html)\n\n## 配置和使用\n\n```\n// 规则配置\nvar groupRules = [{\n    label: \"姓名\",\n    inputName: \"name\",\n    type: \"select\", // 只支持 input 和 select， 默认是input text\n    data: [{key:'', value:''}], // type 为 select 时配置此项\n    events: [{event:'', handler:function(){}}],\n    isHidden: false,\n    formatter: function(val){},\n    resolver: function(val){},\n    attributes: \"required\" // 标签属性，可以定义校验规则\n}];\n\n// 初始话输入框组\nvar inputGroup = $('#inputGroup').inputGroup({\n    domFormWrap: '\u003cdiv class=\"form-horizontal\"\u003e\u003c/div\u003e',\n    domFormGroupWrap: '\u003cdiv class=\"form-group\"\u003e\u003c/div\u003e',\n    domInputWrap: '\u003cdiv class=\"col-sm-3\"\u003e\u003c/div\u003e',\n    domLabel: {cssClass: 'col-sm-2 control-label'}, // label DOM default: {cssClass: 'col-sm-2 control-label'}\n    domInput: {cssClass: 'form-control'}, // input DOM default: {cssClass: 'form-control'}\n    header: '配置', // 标题 default: ''\n    maxLength: 0, // 输入组的转为字符串后的最大长度 default: 0 不做验证\n    groupRules: groupRules, // 规则 default: null\n    initValues: null //初始值 default: null\n});\n\n// 获取输入框组值\nvar val = inputGroup.getInputValues();\nvar str = inputGroup.getValuesAsString();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowiefh%2Finput-group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhowiefh%2Finput-group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhowiefh%2Finput-group/lists"}