order | title |
---|---|
0 |
Choerodon UI of React |
Following the Ant Design specification, we developed a React UI library Choerodon UI
that contains a set of high quality components and demos for building rich, interactive user interfaces.
You can subscribe to this feed for new version notifications: https://github.com/ant-design/ant-design/releases.atom
We recommend using npm or yarn to install,it not only makes development easier,but also allow you to take advantage of the rich ecosystem of Javascript packages and tooling.
$ npm install choerodon-ui --save
$ yarn add choerodon-ui
If you are in a bad network environment,you can try other registries and tools like cnpm.
Add script
and link
tags in your browser and use the global variable choerodon-ui
.
We provide choerodon-ui.js
choerodon-ui.css
and choerodon-ui.min.js
choerodon-ui.min.css
under choerodon-ui/dist
in choerodon-ui's npm package. You can also download these files directly from UNPKG.
We strongly discourage loading the entire files this will add bloat to your application and make it more difficult to receive bugfixes and updates. Antd is intended to be used in conjunction with a build tool, such as webpack, which will make it easy to import only the parts of choerodon-ui that you are using.
import { DatePicker } from 'choerodon-ui';
ReactDOM.render(<DatePicker />, mountNode);
And import stylesheets manually:
import 'choerodon-ui/dist/choerodon-ui.css'; // or 'choerodon-ui/dist/choerodon-ui.less'
Use babel-plugin-import (Recommended)
// .babelrc or babel-loader option
{
"plugins": [
["import", { "libraryName": "choerodon-ui", "libraryDirectory": "es", "style": "css" }] // `style: true` for less
]
}
Note: Don't set
libraryDirectory
if you are using webpack 1.
This allows you to import components from choerodon-ui without having to manually import the corresponding stylesheet. The choerodon-ui babel plugin will automatically import stylesheets.
// import js and css modularly, parsed by babel-plugin-import
import { DatePicker } from 'choerodon-ui';
Manually import
import DatePicker from 'choerodon-ui/lib/date-picker'; // for js
import 'choerodon-ui/lib/date-picker/style/css'; // for css
// import 'choerodon-ui/lib/date-picker/style'; // that will import less
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )