{"id":23130708,"url":"https://github.com/docoder/ant-colony-ui","last_synced_at":"2025-07-26T12:41:13.184Z","repository":{"id":33892892,"uuid":"163246534","full_name":"docoder/ant-colony-ui","owner":"docoder","description":"Ant Colony UI Toolkit based on Ant Design and React","archived":false,"fork":false,"pushed_at":"2022-12-09T13:25:12.000Z","size":34091,"stargazers_count":6,"open_issues_count":48,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-27T00:40:59.966Z","etag":null,"topics":["ant-design","antd","frontend","library","react","styled-components","ui","ui-components"],"latest_commit_sha":null,"homepage":"https://docoder.github.io/ant-colony-ui","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/docoder.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":"2018-12-27T04:19:46.000Z","updated_at":"2020-04-27T07:28:11.000Z","dependencies_parsed_at":"2023-01-15T03:15:34.224Z","dependency_job_id":null,"html_url":"https://github.com/docoder/ant-colony-ui","commit_stats":null,"previous_names":[],"tags_count":158,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docoder%2Fant-colony-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docoder%2Fant-colony-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docoder%2Fant-colony-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docoder%2Fant-colony-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docoder","download_url":"https://codeload.github.com/docoder/ant-colony-ui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230106031,"owners_count":18173954,"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":["ant-design","antd","frontend","library","react","styled-components","ui","ui-components"],"created_at":"2024-12-17T11:09:36.611Z","updated_at":"2024-12-17T11:09:37.305Z","avatar_url":"https://github.com/docoder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ant-colony-ui\n\n\u003e Ant Colony UI Toolkit based on Ant Design and React\n\n[![NPM](https://img.shields.io/npm/v/ant-colony-ui.svg)](https://www.npmjs.com/package/ant-colony-ui) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n### 初衷\n\n- 在 antd 上封装一层，项目中不引用antd，方便以后将antd替换\n- 业务大组件封装，方便快速开发，风格统一\n\n### 设计\n\n- JSON In,  JSON Out\n  - 组件参数接收 配置 JSON\n  - 组件回调输出 结果 JSON\n- 默认值覆盖大多数情况\n- 尽量可自定义满足少数情况\n\n### 组件\n\n- NavFrame\n  - layout\n  - menus\n  - pageLinks\n  - title\n  - actions\n- Form\n  - forms `必填` , 为Object的数组, Object字段如下\n    - key `必填`\n    - label `必填`\n    - type\n      - input  `default`\n      - add  `动态添加`\n      - header\n      - info\n      - select\n      - textArea\n      - date\n      - **checkbox**\n      - **radio**\n      - **rangeDate**\n      - **month**\n    - placeholder\n    - required\n      - bool\n      - **function**\n    - reg\n      - pattern\n      - message\n    - value\n    - disabled\n    - **alwaysEnable**\n    - meta  `type为select时有效`\n      - ref \n        - 表单联动时需要参考的字段的 key\n      - **mode**\n        - undefined  `default`\n        - tags\n        - multiple\n      - data `function / array`\n        - 若有ref配置，function的参数 refValue 为参考字段的值\n      - showSearch\n    - addLabel `type为add时有效`\n    - addKeys `type为add时有效`\n      - 需要动态添加的字段的key值的数组\n    - showTime `type为date时有效`\n    - onChange\n    - data `type为select时有效`\n  - accessoryComponent\n    - 函数\n    - 可返回不受表单控制的附加 UI，\n    - 参数为函数 getFormItem，可返回受表单控制的自定义UI\n    - getFormItem 接收参数为Object, Object 字段如下\n      - label`必填`\n      - key`必填`\n      - value\n      - required\n      - reg\n  - onSubmit，参数如下\n    - values\n      - JSON Out\n    - clear\n      - 函数，调用可清空表单\n  - onReset\n    - 重置表单回调\n  - layout\n    - columnCount\n      - 默认列数\n    - rowColCounts\n      - 每行列数的数组\n      - 若数组列数之和小于所有表单字段数，数组最后一项的列数为之后剩余字段的布局列数\n    - actionDirection\n      -  页末操作按钮的位置\n        - left\n        - center\n        - right\n    - labelPostion \n      - 字段Label的位置\n        - left\n        - top\n    - . . . . . . \n  - **disableEnterSubmit**\n  - … …\n- Table\n  - columns `必填`,  为Object的数组, Object字段如下\n    - title `必填`\n    - dataIndex`必填`\n    - editable\n      - bool\n      - **function**\n    - **type**  `editable 为 true时有效`\n      - input  `default` \n      - select\n      - tags\n      - multiple\n    - **meta** `type 为 select tags multiple 时有效`\n      - ref \n        - 可以参考 Table 同 Row 的其他列字段，与之联动\n      - data `function / array`\n        - 若有ref配置，function的参数 refValue 为参考字段的值\n    - required\n    - **disabled**\n    - fixed\n    - width\n    - reg\n      - pattern\n      - message\n    - actions\n      - label `必填`\n      - callback\n        - 接收参数 text, record, index\n      - show `bool / function`\n        - 函数时接收参数 text, record, index\n        - 函数时需返回bool\n      - confirm\n      - confirmLabel\n  - dataSource `必填`\n  - onCellSave `editable为true时回调`\n  - scrollWidth\n    - 建议指定为大于表格宽度的固定值或百分比, 如 1000\n    - 配合 fixed column 或 floatingScrollDomQuery 使用\n  - floatingScrollDomQuery\n    - 一般为 \".ant-table-scroll .ant-table-body\"，使滚动条 floating\n  - pagination\n    - 参考 antd 的 pagination\n  - onChange\n    - 参数 pagination, filters, sorter\n    - 主要用 pagination 进行分页\n  - **columnsConfigGlobalTableKey**\n    - 列配置的开启并指定全局唯一key（建议：项目唯一性简称+功能Model名+页面名+Table名等），用于缓存\n  - . . . . . . \n- . . . . . .\n\n## Install\n\n```bash\nnpm install --save ant-colony-ui\n```\n\n## Usage\n\n```jsx\nimport React, { Component } from 'react'\n\nimport { Button } from 'ant-colony-ui'\n\nclass Example extends Component {\n  render () {\n    return (\n      \u003cButton title=\"Default\"/\u003e\n    )\n  }\n}\n```\n\n## License\n\nMIT © [docoder](https://github.com/docoder)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocoder%2Fant-colony-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocoder%2Fant-colony-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocoder%2Fant-colony-ui/lists"}