From 48db0657e550131343828da02acd111f2c2c04d2 Mon Sep 17 00:00:00 2001
From: rainie <463103063@qq.com>
Date: Mon, 10 Apr 2017 17:44:07 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20=20[document]=20=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0Select=E7=BB=84=E4=BB=B6=E6=96=87=E6=A1=A3.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/select/readme.md | 131 ++++++++++++++++++++++++++++++++++++
1 file changed, 131 insertions(+)
create mode 100644 components/select/readme.md
diff --git a/components/select/readme.md b/components/select/readme.md
new file mode 100644
index 0000000..b7d5513
--- /dev/null
+++ b/components/select/readme.md
@@ -0,0 +1,131 @@
+## 下拉框(Select)
+
+### 例子
+
+```JSX
+import React, {Component} from 'react';
+import {Select} from 'react-cqtoolbox/lib/select';
+import Section from 'react-cqtoolbox/lib/section';
+
+const countrys = [
+ {value: 'CN', label: '中国'},
+ {value: 'US', label: '美国'},
+ {value: 'HK', label: '中国香港'},
+ {value: 'TW', label: '中国台湾'},
+];
+
+class SelectTest extends Component {
+
+ render() {
+ const selectData = {
+ data: countrys,
+ maxRowNum: 8,
+ onChange: console.log.bind(console),
+ };
+
+ return (
+
+ )
+ }
+}
+
+```
+
+### 属性(Props)
+
+值 | 值类型 | 默认 | 描述
+:---------- | :--------- | :--- | :----------------------------
+`value` | `Any` | | `值`
+`data` | `Array` | | `数据源,包含对象(label, value字段)的数组`
+`maxRowNum` | `Number` | `10` | `下拉框显示的最大行数`
+`onChange` | `Function` | | `当值变化触发onChange函数`
+`theme` | `Object` | | `添加自定义主题`
+
+### 主题(Theme)
+
+Name | Description
+:--------- | :----------
+`menu` | `下拉框菜单样式`
+`menuItem` | `下拉框菜单项样式`
+`menuOutter` | `菜单容器样式`
+
+
+
+## 级联下拉框(CascadeSelect)
+
+### 例子
+
+```jsx
+
+import React, {Component} from 'react';
+import {CascadeSelect} from 'react-cqtoolbox/lib/select';
+import Section from 'react-cqtoolbox/lib/section';
+
+const genres = [
+ {
+ "value": 36,
+ "label": "总榜"
+ },
+ {
+ "value": 6000,
+ "label": "商务"
+ },
+ {
+ "value": 6014,
+ "label": "游戏",
+ "children": [
+ {
+ "value": 7001,
+ "label": "动作游戏"
+ },
+ {
+ "value": 7002,
+ "parentvalue": 6014,
+ "nameEnglish": "Adventure",
+ "label": "探险游戏"
+ }
+ ]
+ }
+];
+
+class SelectTest extends Component {
+ render() {
+ const selectData = {
+ data: genres,
+ onChange: console.log.bind(console),
+ };
+
+ return (
+
+ )
+ }
+}
+```
+
+### 属性(Props)
+
+值 | 值类型 | 默认 | 描述
+:----------------- | :--------- | :--- | :----------------------------
+`value` | `Any` | | `值`
+`data` | `Array` | | `数据源,包含对象(label, value字段)的数组`
+`maxRowNum` | `Number` | `10` | `下拉框显示的最大行数`
+`maxCascadeRowNum` | `Number` | `5` | `级联下拉框显示的最大行数`
+`cascadeAction` | `String` | | `级联下拉框触发行为`
+`onChange` | `Function` | | `当值变化触发onChange函数`
+`theme` | `Object` | | `添加自定义主题`
+
+### 主题(Theme)
+
+Name | Description
+:--------------- | :----------
+`menu` | `下拉框菜单样式`
+`menuItem` | `下拉框菜单项样式`
+`menuOutter` | `菜单容器样式`
+`popup` | `浮层`
+`popupMenu` | `浮层菜单`
+`popupMenuInner` | `浮层菜单内部元素`
+`subMenuItem` | `浮层菜单标题项`