{"id":26180314,"url":"https://github.com/twp0217/react-inline-edit","last_synced_at":"2026-05-03T22:31:44.221Z","repository":{"id":57168437,"uuid":"435786051","full_name":"twp0217/react-inline-edit","owner":"twp0217","description":"Inline edit component for React（基于 React 的内联编辑组件）","archived":false,"fork":false,"pushed_at":"2022-02-09T03:27:35.000Z","size":524,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T03:32:36.812Z","etag":null,"topics":["inline-edit","react","react-component","react-inline-edit"],"latest_commit_sha":null,"homepage":"https://twp0217.github.io/react-inline-edit/","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/twp0217.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-07T07:37:28.000Z","updated_at":"2022-02-09T03:43:12.000Z","dependencies_parsed_at":"2022-08-24T15:07:07.285Z","dependency_job_id":null,"html_url":"https://github.com/twp0217/react-inline-edit","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/twp0217/react-inline-edit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Freact-inline-edit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Freact-inline-edit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Freact-inline-edit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Freact-inline-edit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twp0217","download_url":"https://codeload.github.com/twp0217/react-inline-edit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twp0217%2Freact-inline-edit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32587816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"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":["inline-edit","react","react-component","react-inline-edit"],"created_at":"2025-03-11T21:55:25.037Z","updated_at":"2026-05-03T22:31:44.206Z","avatar_url":"https://github.com/twp0217.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-inline-edit\n\nInline edit component for React（基于 React 的内联编辑组件）\n\n## 安装\n\n```bash\nnpm install @twp0217/react-inline-edit --save\n```\n\n## 使用\n\n```typescript\nimport React from 'react';\nimport InlineEdit from '@twp0217/react-inline-edit';\n\nexport default () =\u003e {\n  const [editValue, setEditValue] = React.useState\u003cstring\u003e('');\n\n  return (\n    \u003cInlineEdit\n      defaultValue={editValue}\n      readView={editValue || '请点击输入值'}\n      editView={\u003cinput placeholder=\"请输入值\" /\u003e}\n      onConfirm={setEditValue}\n    /\u003e\n  );\n};\n```\n\n## API\n\n### InlineEditProps\n\n| 名称           | 类型                 | 默认值    | 说明               |\n| -------------- | -------------------- | --------- | ------------------ |\n| className      | string               | -         | 类名               |\n| style          | React.CSSProperties  | -         | 样式               |\n| disabled       | `boolean`            | `false`   | 是否禁用           |\n| keepOpenOnBlur | `boolean`            | `false`   | 失去焦点时保持打开 |\n| hideActions    | `boolean`            | `false`   | 是否隐藏操作按钮   |\n| confirmText    | `string`             | `Confirm` | 确认文本           |\n| cancelText     | `string`             | `Cancel`  | 取消文本           |\n| defaultValue   | `string`             | -         | 默认值             |\n| isEditing      | `boolean`            | -         | 是否正在编辑       |\n| loading        | `boolean`            | -         | 加载中             |\n| placement      | `top` \\| `bottom`    | -         | 按钮位置           |\n| readView       | `React.ReactNode`    | -         | 查看视图           |\n| editView       | `React.ReactNode`    | -         | 编辑视图           |\n| onEdit         | `() =\u003e void`         | -         | 编辑事件           |\n| onBlur         | `() =\u003e void`         | -         | 失去焦点事件       |\n| onConfirm      | `(value: T) =\u003e void` | -         | 确认事件           |\n| onCancel       | `() =\u003e void`         | -         | 取消事件           |\n\n## 支持\n\n- 如果项目对你有帮助，请点颗星星:star:，谢谢。\n- 如果你对项目有想法、问题、BUG，欢迎讨论。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwp0217%2Freact-inline-edit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwp0217%2Freact-inline-edit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwp0217%2Freact-inline-edit/lists"}