forked from rsuite/rsuite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
98 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,12 @@ | |
"stage-0", | ||
"react", | ||
"es2015" | ||
] | ||
], | ||
"env": { | ||
"test": { | ||
"plugins": [ | ||
"istanbul" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
service_name: travis-ci | ||
repo_token: 1Aagfc4r6UqD9M88fFI8XnBhr6Lr3Dy1o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ build/** | |
lib/** | ||
tools/* | ||
node_modules/** | ||
webpack.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,114 @@ | ||
# [RSUITE](https://rsuite.github.io) [![Travis][build-badge]][build] [![npm][npm-badge]][npm] | ||
[![Discord][discord-badge]][discord] | ||
|
||
|
||
RSUITE `[ɑː(r)swiːt]` 是一套 React 开发的 UI 组件库,提供 Bootstrap 设计体系的常用组件,并且会在此基础上持续开发一些高级组件。 | ||
# RSUITE | ||
|
||
我们的目标就是让 WEB 开发更快捷,同时具有一定的灵活性和扩展性。 | ||
------ | ||
|
||
RSUITE `[ɑː(r)swiːt]` 是一套基于 React 开发的 UI 组件库,产生于 HYPERS 前端团队,是面向企业级后台产品的一套前端解决方案。 | ||
|
||
RSUITE 目标就是让 WEB 开发更快捷,同时具有一定的灵活性和扩展性,致力于改善前端工程师的开发体验。 | ||
|
||
## 特性 | ||
|
||
- 基于 React 组件化开发模式; | ||
- 丰富、漂亮 UI 组件; | ||
- 支持多主题切换; | ||
- 支持响应式布局; | ||
- 支持 ES2015。 | ||
------ | ||
版本及状态 | ||
|
||
[](https://www.npmjs.com/package/rsuite) | ||
[](https://travis-ci.org/rsuite/rsuite) | ||
[](https://coveralls.io/github/rsuite/rsuite?branch=next) | ||
|
||
社区 | ||
|
||
## 版本 | ||
[](https://discord.gg/GmPXTH3) | ||
|
||
[](https://www.npmjs.com/package/rsuite) | ||
[](https://travis-ci.org/rsuite/rsuite) | ||
|
||
|
||
兼容 React 版本 `^0.14.9 || >=15.3.0` | ||
|
||
## 安装 | ||
## 快速开始 | ||
|
||
<br/> | ||
安装: | ||
|
||
``` | ||
npm install rsuite --save | ||
npm i rsuite --save | ||
``` | ||
|
||
|
||
示例: | ||
|
||
```js | ||
// ES2015 | ||
import { Button } from 'rsuite'; | ||
|
||
// CommonJS | ||
var Button = require('rsuite').Button; | ||
ReactDOM.render(<Button>Button</Button>, mountNode); | ||
``` | ||
|
||
// AMD | ||
define(['rsuite'], function(Suite) { | ||
var Button = Suite.Button; | ||
... | ||
}); | ||
|
||
## 创建一个 RSUITE 应用 | ||
|
||
ReactDOM.render(<Button>Button</Button>, mountNode); | ||
``` | ||
通过 `create-rsuite-app` 快速创建一个 RSUITE 应用。 另外,应用中还集成了以下内容: | ||
|
||
- `Redux`: 数据流管理 | ||
- `React Router`: 路由管理 | ||
- `React Intl`: 国际化 | ||
- `ESLint`: 代码检查 | ||
- `Webpack`: 应用构建及开发环境搭建 | ||
- `Babel`: 代码编译 | ||
|
||
## 主题 | ||
详细参考 [dependencies](https://github.com/rsuite/create-rsuite-app/blob/master/generators/app/templates/package.json#L12-L33) | ||
|
||
- 可以通过 [rsuite-theme](https://github.com/rsuite/rsuite-theme) 管理,只需要配置一个系统主色,自动生成系统配色方案。 | ||
安装: | ||
|
||
安装 | ||
``` | ||
npm install rsuite-theme --save | ||
npm i -g yo | ||
npm i -g generator-create-rsuite-app | ||
``` | ||
`import` | ||
```js | ||
import 'rsuite-theme/dist/less/rsuite.less'; | ||
|
||
创建项目: | ||
|
||
``` | ||
# 创建并进入项目文件夹 | ||
mkdir your-project && cd your-project | ||
- 也可以通过 CDN 引入 css 文件 | ||
// 使用脚手架安装项目 | ||
yo create-rsuite-app | ||
``` | ||
|
||
```html | ||
<link rel="stylesheet" href="https://unpkg.com/rsuite-theme/dist/css/rsuite.min.css" /> | ||
运行项目: | ||
|
||
等待 `npm install` 安装完成后,执行下面命令,打开 `localhost:3002` 即可运行项目。 | ||
|
||
``` | ||
npm run dev | ||
``` | ||
|
||
> 使用中如果存在问题,提交 [issues](https://github.com/rsuite/create-rsuite-app/issues/new) | ||
## 其他组件 | ||
## 主题相关 | ||
|
||
- [rsuite-table](https://github.com/rsuite/rsuite-table) | ||
- [rsuite-datepicker](https://github.com/rsuite/rsuite-datepicker) | ||
- [rsuite-daterangepicker](https://github.com/rsuite/rsuite-daterangepicker) | ||
- [rsuite-picker](https://github.com/rsuite/rsuite-picker) | ||
- [rsuite-echarts](https://github.com/rsuite/rsuite-echarts) | ||
- [rsuite-uploader](https://github.com/rsuite/rsuite-uploader) | ||
- [rsuite-tree](https://github.com/rsuite/rsuite-tree) | ||
- [rsuite-slider](https://github.com/rsuite/rsuite-slider) | ||
- [rsuite-affix](https://github.com/rsuite/rsuite-affix) | ||
- [rsuite-autocomplete](https://github.com/rsuite/rsuite-autocomplete) | ||
|
||
|
||
## License | ||
- 方式 1 :引用 less 文件 | ||
|
||
MIT | ||
```less | ||
// 如果需要使用一些拓展组件,应该引入组件样式 | ||
@import "~rsuite-table/lib/less/index"; | ||
|
||
// 引入 RSUITE 样式 | ||
@import "~rsuite-theme/dist/less/rsuite"; | ||
|
||
[build-badge]: https://travis-ci.org/rsuite/rsuite.svg?branch=master | ||
[build]: https://travis-ci.org/rsuite/rsuite | ||
// 修改主题颜色,不设置则使用 RSUITE 默认颜色 | ||
@base-color: #6292f0; | ||
|
||
// 可以修改主题中的变量参数,来自定义自己的主题 | ||
// 参考 https://github.com/rsuite/rsuite-theme/blob/master/src/less/variables.less | ||
``` | ||
|
||
- 方式 2 : CDN | ||
|
||
```html | ||
<link rel="stylesheet" href="https://unpkg.com/rsuite-theme/dist/css/rsuite.min.css" /> | ||
``` | ||
|
||
[npm-badge]: https://badge.fury.io/js/rsuite.svg | ||
[npm]: http://badge.fury.io/js/rsuite | ||
- 其他详细配置参考 [rsuite-theme](https://rsuitejs.com/components/theme) | ||
|
||
|
||
[discord-badge]: https://img.shields.io/badge/Discord-Join%20chat%20%E2%86%92-738bd7.svg | ||
[discord]: https://discord.gg/GmPXTH3 | ||
> 使用中如果存在问题,提交 [issues](https://github.com/rsuite/rsuite-theme/issues/new) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters