{"id":20163843,"url":"https://github.com/systemlight/ra-table","last_synced_at":"2026-06-05T06:31:18.331Z","repository":{"id":125645512,"uuid":"286345960","full_name":"SystemLight/ra-table","owner":"SystemLight","description":"A customized table component for editing operation based on react and antd table.【基于React和antd-table定制的可编辑操作的表格组件】","archived":false,"fork":false,"pushed_at":"2022-07-02T18:06:08.000Z","size":254,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T14:23:58.066Z","etag":null,"topics":["antd","ra-table","react","table"],"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/SystemLight.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":"2020-08-10T01:12:35.000Z","updated_at":"2023-06-27T01:08:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffeca884-2f27-4476-a182-bfbb46c5a070","html_url":"https://github.com/SystemLight/ra-table","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemLight%2Fra-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemLight%2Fra-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemLight%2Fra-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SystemLight%2Fra-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SystemLight","download_url":"https://codeload.github.com/SystemLight/ra-table/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241600492,"owners_count":19988715,"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":["antd","ra-table","react","table"],"created_at":"2024-11-14T00:32:02.703Z","updated_at":"2025-11-29T07:04:46.060Z","avatar_url":"https://github.com/SystemLight.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ra-antd-table\n\n\u003e 基于react antd进行拓展的表格组件\n\n### 安装\n\n```\nnpm install ra-antd-table react antd @ant-design/icons react-resizable js-export-excel\nnpm i @types/react-resizable --save-dev\n```\n\n### 使用示例【TS版本】\n\n```\nimport React, {useState} from 'react';\nimport \"antd/dist/antd.min.css\";\nimport EditTable from \"ra-antd-table\";\nimport {IColumnsType} from \"ra-antd-table/dist/interface\";\n\nconst columns = [\n    {\n        key: \"name\",\n        dataIndex: \"name\",\n        sortKey: \"name\",\n        title: \"姓名\"\n    },\n    {\n        key: \"age\",\n        dataIndex: \"age\",\n        sortKey: \"age\",\n        filterKey: \"age\",\n        totalKey: \"age\",\n        width: 180,\n        title: \"年龄\"\n    },\n    {\n        key: \"size\",\n        dataIndex: \"size\",\n        sortKey: \"size\",\n        filterKey: \"size\",\n        title: \"位置\"\n    }\n];\n\nconst data = [\n    {\n        key: \"1\",\n        name: \"SystemLight\",\n        age: 23,\n        size: 1\n    },\n    {\n        key: \"2\",\n        name: \"Lisys\",\n        age: 18,\n        size: 2\n    },\n    {\n        key: \"3\",\n        name: \"kirito\",\n        age: 12,\n        size: 3\n    }\n];\n\nfunction App() {\n    const [colState, setColState] = useState\u003cIColumnsType\u003cany\u003e\u003e(columns);\n    return (\n        \u003c\u003e\n            \u003cdiv className={\"s-wrap\"} style={{paddingTop: 15}}\u003e\n                \u003cEditTable\u003cany\u003e\n                    columns={colState}\n                    data={data} title={\"表格标题\"}\n                    onResize={(e, {size}, i) =\u003e {\n                        colState[i].width = size.width;\n                        setColState([...colState]);\n                    }}\n                    onChangeHide={(idx, status) =\u003e {\n                        colState[idx].hide = status;\n                        setColState([...colState]);\n                    }}\n                    onChangePin={(idx, val) =\u003e {\n                        colState[idx].fixed = val === \"none\" ? undefined : val;\n                        setColState([...colState]);\n                    }}\n                /\u003e\n            \u003c/div\u003e\n        \u003c/\u003e\n    );\n}\n\nexport default App;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemlight%2Fra-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemlight%2Fra-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemlight%2Fra-table/lists"}