cc-antd-component

react-hooks + typescript 二次封装antd组件库

Usage no npm install needed!

<script type="module">
  import ccAntdComponent from 'https://cdn.skypack.dev/cc-antd-component';
</script>

README

项目介绍

该项目是基于antd二次封装组件,使用的技术栈为react-hooks + typescript + antd。在此项目当中,我们会基于antd的组件库已有组件封装如下组件:

  • 图标选择器
  • 省市区选择
  • 趋势标记
  • 时间选择器
  • 通知菜单
  • 城市选择器
  • 进度条拓展
  • 时间轴拓展
  • 导航菜单拓展
  • 可配置项表单
  • 日历

组件涵盖了大部分通用业务场景,特别是后台系统中常用功能,我们都会以一种全新的方式来封装,每个组件完全支持hooks和ts。

特别说明

因为该组件库是基于antd二次封装,所有使用该组件库前,必须确保项目安装并正确引入了antd@ant-design/icons,否则该组件库则无法使用。
antd安装使用指南

使用组件

  1. 项目安装依赖: npm i -S cc-antd-component
  2. 在项目index.cssApp.css先引入 antd样式文件和 cc-antd-component样式文件
@import 'antd/dist/antd.css';
@import 'cc-antd-component/style.css';
  1. 在组件里写入以下代码:
  import {CcChooseIcon} from 'cc-antd-component'
  <CcChooseIcon></CcChooseIcon>
  // ...

演示地址