An ui library with ant design pro & echarts for developing
npm install --save cm-dev-ui
import * as React from 'react'
import MyComponent from 'cm-dev-ui'
class Example extends React.Component {
render () {
return (
<MyComponent />
)
}
}
mkdir cm-dev-ui
cd cm-dev-ui
git clone https://github.com/walkerdh/cm-dev-ui.git
mkdir cm-antdp-ui
cd cm-antdp-ui
git clone https://git.coding.net/dhsama/cm-antdp-ui.git
cm-dev-ui
├── example //测试用项目(基于es6的测试组件项目,使用js库,目前弃用)
│ ├── node_modules //项目所需库
│ ├── public //项目静态目录
│ │ ├── index.html
│ │ └── manifest.json
│ ├── src //项目代码
│ │ ├── App.js
│ │ ├── index.css
│ │ └── index.js
│ ├── README.md //说明文档
│ ├── favicon.ico
│ └── manifest.json
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── .editorconfig
├── .travis.yml
├── rollup.config.js
├── tsconfig.json
├── tsconfig.test.json
├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
└── src
├── component // 组件目录
│ ├── linechart //折线图组件
│ │ ├── index.css //组件样式
│ │ └── index.tsx //组件代码
│ └── piechart //饼状图组件
│ ├── index.css //组件样式
│ └── index.tsx //组件代码
├── index.tsx //封装接口类
├── styles.css
├── test.ts
└── typings.d.ts
npm install
npm link cm-dev-ui
- 在component中创建相应的可视化组件名
- 创建index.tsx及index.css
- 开发完成后,在src/index.tsx中添加相应接口
- 组件命名需采用驼峰法命名,在export中需要将首字母大写
export { default as CMYourComponent } from './component/yourComponent';
尚未完成
MIT © walkerdh