{"id":21481255,"url":"https://github.com/zhoubichuan/web-react","last_synced_at":"2026-01-07T01:36:38.415Z","repository":{"id":47268012,"uuid":"181325780","full_name":"zhoubichuan/web-react","owner":"zhoubichuan","description":"📖react 16.x、react17.x相关知识的总结--持续更新💪【http://zhoubichuan.com/web-react】","archived":false,"fork":false,"pushed_at":"2024-07-23T07:48:56.000Z","size":27416,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T22:51:04.921Z","etag":null,"topics":["dva","dvajs","react","react-redux","react-router","umi","umijs"],"latest_commit_sha":null,"homepage":"https://zhoubichuan.github.io/web-react/","language":"TypeScript","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/zhoubichuan.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":"2019-04-14T15:02:23.000Z","updated_at":"2024-07-23T07:49:00.000Z","dependencies_parsed_at":"2024-07-22T13:35:41.546Z","dependency_job_id":"2a9361c3-bcb4-4739-a7ff-92622e977db0","html_url":"https://github.com/zhoubichuan/web-react","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhoubichuan%2Fweb-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhoubichuan%2Fweb-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhoubichuan%2Fweb-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhoubichuan%2Fweb-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhoubichuan","download_url":"https://codeload.github.com/zhoubichuan/web-react/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245921670,"owners_count":20694361,"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":["dva","dvajs","react","react-redux","react-router","umi","umijs"],"created_at":"2024-11-23T12:22:39.525Z","updated_at":"2026-01-07T01:36:38.380Z","avatar_url":"https://github.com/zhoubichuan.png","language":"TypeScript","readme":"# 综合案例\n\n## myantd\n\n基本 antd 4.0 二次封装的业务组件库。\n\n文档请配合 antd 文档使用 [Ant Design](https://ant.design/components/overview-cn/)\n\n## 使用方法\n\n### 安装\n\n以 yarn 为例\n\n```sh\nyarn add myantd\n```\n\n### 配置\n\n.bablerc\n\n### 使用\n\n1、 使用包内的 `ConfigProvider` 组件对应用根节点组件进行包裹，修改全局组件命名空间为 `myantd`\n\nindex.js\n\n```js\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport App from './App'\nimport { ConfigProvider } from 'myantd'\n\nReactDOM.render(\n  \u003cConfigProvider\u003e\n    \u003cApp /\u003e\n  \u003c/ConfigProvider\u003e,\n  document.querySelect('#root')\n)\n```\n\n2、这样引入组件即可，会按需加载基于 antd 定制过的组件\n\n```js\nimport React from 'react'\nimport { Button } from 'myantd'\n\nexport default () =\u003e {\n  return \u003cButton type=\"primary\"\u003e点我\u003c/Button\u003e\n}\n```\n\n3、此外 `myantd` 必须全量引入定制过的 `antd` 样式。\n\n```js\nimport 'myantd/esm/styles/index.css'\n```\n\nPS：如果项目中已经有 antd 3.x 版本，请引入 myantd 所有组件样式。\n\n```js\nimport 'myantd/esm/styles/styleWithoutGlobal.css'\n```\n\n譬如在umi项目中使用，定位global入口\n```js\nimport React from 'react'\nimport { Button,ConfigProvider } from 'myantd';\n// + import 'myantd/esm/styles/index.css'\n\nexport default function IndexPage() {\n  return (\n    \u003cConfigProvider\u003e\n      \u003ch1\u003ePage index\u003c/h1\u003e\n      \u003cButton type=\"primary\"\u003ebutton\u003c/Button\u003e\n    \u003c/ConfigProvider\u003e\n  );\n}\n```\n\n## 如何开发 myantd\n\n```sh\nyarn\n\n# 启动\nyarn start\n\n# 构建\nyarn build\n```\n\n## 开发官网\n\n在 src 文件中，修改组件，编写组件文档及单元测试。\n\n# 发包流程\n\n1. 提交代码\n\n```shell\n# 首先确认要提交的文件\ngit add .\n\n# 运行提交命令\n# 无add时，需要优化\nyarn commit\n# 或者\nnpm run commit\n\n后续步骤同正常git代码提交流程\n\n```\n\n2. 发包\n\n```shell\n# 升级版本\nyarn release\n# 或者\nnpm run release\n```\n\n  \u003cp align=\"center\"\u003e\n    \u003ca\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/zhoubichuan/web-react.svg\"/\u003e\u003c/a\u003e\n    \u003ca\u003e\u003cimg src=\"https://img.shields.io/badge/code_style-standard-brightgreen.svg\"/\u003e\u003c/a\u003e\n    \u003ca\u003e\u003cimg src=\"https://img.shields.io/github/issues/zhoubichuan/web-react.svg\"/\u003e\u003c/a\u003e\n    \u003ca\u003e\u003cimg src=\"https://img.shields.io/github/forks/zhoubichuan/web-react.svg\"/\u003e\u003c/a\u003e\n    \u003ca\u003e\u003cimg src=\"https://img.shields.io/github/stars/zhoubichuan/web-react.svg\"/\u003e\u003c/a\u003e\n    \u003ca\u003e\u003cimg src=\"https://img.shields.io/maintenance/yes/2020.svg\"/\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n  \u003ch1\u003eweb-react\u003c/h1\u003e\n  \u003cp\u003e在 \u003ca href=\"https://zhoubichuan.github.io/web-react/\"\u003e这里\u003c/a\u003e 阅读体验更佳\u003c/p\u003e\n  \u003cp\u003e整理自各大技术社区和权威书籍的前端技术图谱\u003c/p\u003e\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhoubichuan%2Fweb-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhoubichuan%2Fweb-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhoubichuan%2Fweb-react/lists"}