{"id":19345592,"url":"https://github.com/future-team/eg-steps","last_synced_at":"2025-10-09T00:15:02.383Z","repository":{"id":70588922,"uuid":"86285773","full_name":"future-team/eg-steps","owner":"future-team","description":"步骤组件，用于显示流程进行到第几步","archived":false,"fork":false,"pushed_at":"2017-03-28T08:34:58.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-04T03:21:38.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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","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":"2017-03-27T03:09:14.000Z","updated_at":"2017-03-28T08:31:54.000Z","dependencies_parsed_at":"2023-04-08T20:54:49.494Z","dependency_job_id":null,"html_url":"https://github.com/future-team/eg-steps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/future-team/eg-steps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-steps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-steps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-steps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-steps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/future-team","download_url":"https://codeload.github.com/future-team/eg-steps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/future-team%2Feg-steps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000715,"owners_count":26082879,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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:23.416Z","updated_at":"2025-10-09T00:15:02.368Z","avatar_url":"https://github.com/future-team.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eg-steps\n\n步骤组件，用于显示流程进行到第几步\n```jsx\n class Demo extends Component{\n\n     constructor(props,context){\n         super(props,context);\n         this.state={\n             index:0,\n             list:['合作信息','公司信息','资质信息','资质信息']\n         };\n     }\n     \n     componentDidMount(){\n         let _this=this;\n         setTimeout(function(){\n            _this.setState({\n                list:['合作信息','公司信息','资质信息','资质信息','公司信息','资质信息','资质信息']\n            });\n         },2000);\n     }\n     \n     toggleIndex(str,index){\n         this.setState({\n             index\n         });\n     }\n     \n     render(){\n         return (\n             \u003cdiv style={{margin:'20px 50px'}}\u003e\n                 \u003cSteps\n                     clickCallback={::this.toggleIndex}\n                     list={this.state.list}\n                     currentStep={this.state.index}\u003e\n                 \u003c/Steps\u003e\n             \u003c/div\u003e\n         )\n     }\n }\n\n```\n\n\n#### `\u003cSteps\u003e` Props:\n- readOnly  是否为只读模式（只读模式不会触发点击回调），默认为false\n- list  steps内容数组，把每一步的文案放入数组中作为list的值\n并且提默认样式。数组中的每个item结构为{item:'',callback:function(){}},item既可以为string，也可以为react元素\n- currentStep  当前处于第几步，默认为0，也就是说所有的步骤都没有开始，如果到第一步的话将currentStep设置为1即可，注意currentStep不可以超过list数组长度\n- clickCallback  点击每一步的回调，function(str,index){} str为步骤名称，index为第几步（从1开始计数）\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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-team%2Feg-steps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuture-team%2Feg-steps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuture-team%2Feg-steps/lists"}