1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/open-hand-choerodon-ui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
introduce.en-US.md 4.2 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
Vink Dong Отправлено 7 лет назад f03bd7d
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.

Features

  • An enterprise-class UI design language for web applications.
  • A set of high-quality React components out of the box.
  • Written in TypeScript with complete defined types.
  • The whole package of development and design resources and tools.

Environment Support

  • Modern browsers and Internet Explorer 9+ (with polyfills)
  • Server-side Rendering
  • Electron

Version

  • Stable: npm package

You can subscribe to this feed for new version notifications: https://github.com/ant-design/ant-design/releases.atom

Installation

Using npm or yarn

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.

Import in Browser

Add script and link tags in your browser and use the global variable antd.

We provide antd.js antd.css and antd.min.js antd.min.css under choerodon-ui/dist in choerodon-ui's npm package. You can also download these files directly from CDNJS or 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 antd that you are using.

Usage

import { DatePicker } from 'choerodon-ui';
ReactDOM.render(<DatePicker />, mountNode);

And import stylesheets manually:

import 'choerodon-ui/dist/antd.css';  // or 'choerodon-ui/dist/antd.less'

Use modularized antd

  • 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 antd 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

TypeScript

  • Don't use @types/antd, as antd provides a built-in ts definition already.

Links

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/open-hand-choerodon-ui.git
git@gitlife.ru:oschina-mirror/open-hand-choerodon-ui.git
oschina-mirror
open-hand-choerodon-ui
open-hand-choerodon-ui
release-0.2.2