0.0.0 • Published 5 years ago
cm-dev-ui v0.0.0
cm-dev-ui
An ui library with ant design pro & echarts for developing
Install
npm install --save cm-dev-ui
Usage
import * as React from 'react'
import MyComponent from 'cm-dev-ui'
class Example extends React.Component {
render () {
return (
<MyComponent />
)
}
}
从git上获取cm-dev-ui项目
创建目录
mkdir cm-dev-ui
从git上获取
cd cm-dev-ui
git clone https://github.com/walkerdh/cm-dev-ui.git
从git上获取cm-antdp-ui项目
创建目录
mkdir cm-antdp-ui
从git上获取
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
项目调试方式
安装cm-dev-ui及cm-antdp-ui
npm install
在cm-antdp-ui中链接cm-dev-ui
npm link cm-dev-ui
开发内容
For 组件开发者
- 在component中创建相应的可视化组件名
- 创建index.tsx及index.css
- 开发完成后,在src/index.tsx中添加相应接口
- 组件命名需采用驼峰法命名,在export中需要将首字母大写
export { default as CMYourComponent } from './component/yourComponent';
For 样式开发者
尚未完成
License
MIT © walkerdh