@seayona/antd-plusdeprecated

An enterprise-class UI design language and React-based implementation

Usage no npm install needed!

<script type="module">
  import seayonaAntdPlus from 'https://cdn.skypack.dev/@seayona/antd-plus';
</script>

README

Ant Design +

An enterprise-class UI design language and React implementation.

说明文档

安装

使用 npm 或 yarn 安装

我们推荐使用 npm 或 yarn 的方式进行开发,不仅可在开发环境轻松调试,也可放心地在生产环境打包部署使用,享受整个生态圈和工具链带来的诸多好处。

$ npm install @seayona/antd-plus --save
$ yarn add @seayona/antd-plus

示例

import { Select } from 'antd-plus';
ReactDOM.render(<Select />, mountNode);

引入样式:

import 'antd/dist/antd.css';
import '@seayona/antd-plus/dist/antd-plus.css';

按需加载

下面两种方式都可以只加载用到的组件。

  • 使用 babel-plugin-import(推荐)。

    // .babelrc or babel-loader option
    {
      "plugins": [
       ['import', { libraryName: 'antd', libraryDirectory: 'es', style: false }, "antd"],
       ['import', { libraryName: '@seayona/antd-plus', libraryDirectory: 'es', style: false }, "@seayona/antd-plus"],
      ]
    }
    

    注意:webpack 1 无需设置 libraryDirectory

    然后只需从 @seayona/antd-plus 引入模块即可,无需单独引入样式。等同于下面手动引入的方式。

    // babel-plugin-import 会帮助你加载 JS 和 CSS
    import { Select } from '@seayona/antd-plus';
    
  • 手动引入

    import Select from '@seayona/antd-plus/lib/select';  // 加载 JS
    import '@seayona/antd-plus/lib/select/style/css';        // 加载 CSS
    import '@seayona/antd-plus/lib/select/style';         // 加载 LESS