diff --git a/compositor.json b/compositor.json index 97d302af62..52bc23c161 100644 --- a/compositor.json +++ b/compositor.json @@ -75,7 +75,7 @@ "metadata": { "source": "github.readme" }, - "html": "
\n \n \n \n
\n\n\n\n\n一套企业级的 UI 设计语言和 React 实现。
\n\nantd
是一个开源项目,我们欢迎社区参与共建。如果你对此项目感兴趣,有 很多方式 进行参与。你可以 watch 这个仓库,加入 issue 中的讨论,以及尝试实现一些 已接受的特性。我们会给予有活跃贡献的社区成员 collaborator 权限。
npm install antd
import { DatePicker } from 'antd';\nReactDOM.render(<DatePicker />, mountNode);
引入样式:
\nimport 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
按需加载可通过此写法 import DatePicker from 'antd/lib/date-picker'
或使用插件 babel-plugin-import。
// tsconfig.json\n{\n "compilerOptions": {\n "moduleResolution": "node",\n "jsx": "preserve",\n "allowSyntheticDefaultImports": true\n }\n}
\n\n注意:
\n\n
\n- 设置
\nallowSyntheticDefaultImports
避免error TS1192: Module 'react' has no default export
的错误。- 不要使用 @types/antd, antd 已经自带了 TypeScript 定义。
\n
参考 国际化文档。
\n$ git clone git@github.com:ant-design/ant-design.git\n$ npm install\n$ npm start
打开浏览器访问 http://127.0.0.1:8001 ,更多本地开发文档参见: https://github.com/ant-design/ant-design/wiki/Development 。
\n在任何形式的参与前,请先阅读 贡献者文档。如果你希望参与贡献,欢迎 Pull Request,或给我们 报告 Bug。
\n\n\n强烈推荐阅读 《提问的智慧》、《如何向开源社区提问题》 和 《如何有效地报告 Bug》,更好的问题更容易获得帮助。
\n
如果您在使用的过程中碰到问题,可以通过下面几个途径寻求帮助,同时我们也鼓励资深用户通过下面的途径给新人提供帮助。
\n通过 Stack Overflow 或者 Segment Fault 提问时,建议加上 antd
标签。
\n \n \n \n
\n\n\n\n\nAn enterprise-class UI design language and React-based implementation.
\n\nantd
is an open source project, improvements are welcomed. If you are interested in contributing to antd
, you can watch this repository, join in discussion, or try to implement some features which have been accepted. Actually, there are many ways to contribute. And we are always happy to offer collaborator permission for some active contributors.
npm install antd
import { DatePicker } from 'antd';\nReactDOM.render(<DatePicker />, mountNode);
And import style manually:
\nimport 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
Use babel-plugin-import (Recommended)
\n// .babelrc or babel-loader option\n {\n "plugins": [\n ["import", { libraryName: "antd", style: "css" }] // `style: true` for less\n ]\n }
Then you can import components from antd, equivalent to import manually below.
\n// import js and css modularly, parsed by babel-plugin-import\n import { DatePicker } from 'antd';
Manually import
\nimport DatePicker from 'antd/lib/date-picker'; // for js\n import 'antd/lib/date-picker/style/css'; // for css\n // import 'antd/lib/date-picker/style'; // that will import less
// tsconfig.json\n{\n "compilerOptions": {\n "moduleResolution": "node",\n "jsx": "preserve",\n "allowSyntheticDefaultImports": true\n }\n}
\n\nNote:
\n\n
\n- set
\nallowSyntheticDefaultImports
to preventerror TS1192: Module 'react' has no default export
.- Don't use @types/antd, antd provide a built-in ts definition already.
\n
See i18n.
\n$ git clone git@github.com:ant-design/ant-design.git\n$ npm install\n$ npm start
Open your browser and visit http://127.0.0.1:8001 , see more at https://github.com/ant-design/ant-design/wiki/Development .
\nWe welcome all contributions, please read our CONTRIBUTING.md first. You can submit any ideas as pull requests or as GitHub issues. If you'd like to improve code, check out the Development Instructions and have a good time! :)
\n" }, { "component": "footer",