{"id":19527955,"url":"https://github.com/c10342/react-ui","last_synced_at":"2025-07-20T19:33:36.944Z","repository":{"id":55231551,"uuid":"258239968","full_name":"c10342/react-ui","owner":"c10342","description":"慕课网学习课程—react+typescript组件库","archived":false,"fork":false,"pushed_at":"2022-02-10T22:08:02.000Z","size":1784,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T03:48:25.835Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/c10342.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":"2020-04-23T14:57:00.000Z","updated_at":"2021-04-04T10:47:49.000Z","dependencies_parsed_at":"2022-08-14T17:13:18.461Z","dependency_job_id":null,"html_url":"https://github.com/c10342/react-ui","commit_stats":null,"previous_names":["c10342/lin-ui"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/c10342/react-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c10342%2Freact-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c10342%2Freact-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c10342%2Freact-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c10342%2Freact-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c10342","download_url":"https://codeload.github.com/c10342/react-ui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c10342%2Freact-ui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266187266,"owners_count":23889951,"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":[],"created_at":"2024-11-11T01:16:57.227Z","updated_at":"2025-07-20T19:33:36.894Z","avatar_url":"https://github.com/c10342.png","language":"TypeScript","readme":"\n## lin-react-ui\n\n这是一套基于react+typescript的ui组件库\n\n### 安装\n\n使用 npm 或 yarn 安装\n\n```shell script\nnpm install lin-react-ui --save\n\nyarn add lin-react-ui\n```\n\n### 使用\n\n- 全量引入\n\n引用样式\n```javascript\nimport 'lin-react-ui/dist/index.css';\n```\n\n使用组件\n```javascript\nimport { Button } from 'lin-react-ui';\n\nReactDOM.render(\u003cButton /\u003e, mountNode);\n```\n\n- 按需加载\n\n下面两种方式都可以只加载用到的组件。\n\n使用 babel-plugin-import（推荐）\n```shell script\nnpm install babel-plugin-import -D\n```\n```javascript\n// .babelrc.js\n  plugins: [\n    [\n      \"import\",\n      {\n        libraryName: \"lin-react-ui\",\n        camel2DashComponentName: false, // 是否需要驼峰转短线\n        camel2UnderlineComponentName: false, // 是否需要驼峰转下划线\n        libraryDirectory: \"dist/components\",\n        style: \"css\",\n      },\n    ],\n  ],\n```\n然后只需从 lin-react-ui 引入模块即可，无需单独引入样式。等同于下面手动引入的方式。\n```javascript\n// babel-plugin-import 会帮助你加载 JS 和 CSS\nimport { Button } from 'lin-react-ui';\n```\n\n\n手动引入\n```javascript\nimport Button from 'lin-react-ui/components/Button'; // 加载 JS\nimport 'lin-react-ui/components/Button/style/css'; // 加载 CSS\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc10342%2Freact-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc10342%2Freact-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc10342%2Freact-ui/lists"}