From 136dd812a2b1980523cbc083a87e6b0e39109f2f Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 30 Aug 2017 09:23:42 +0800 Subject: [PATCH 01/12] add expandable plugin --- uidoc/book.json | 6 ++++-- uidoc/package.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/uidoc/book.json b/uidoc/book.json index b3fdd5aea..1e736f4ab 100644 --- a/uidoc/book.json +++ b/uidoc/book.json @@ -2,7 +2,8 @@ "plugins": [ "jsfiddle", "splitter", - "theme-api" + "theme-api", + "expandable-chapters" ], "pluginsConfig": { "theme-default": { @@ -18,6 +19,7 @@ "height": "100", "width": "500", "fontColor": "00FF00" - } + }, + "expandable-chapters":{} } } \ No newline at end of file diff --git a/uidoc/package.json b/uidoc/package.json index c205aa179..6b2fcd46c 100644 --- a/uidoc/package.json +++ b/uidoc/package.json @@ -22,6 +22,7 @@ "devDependencies": { "gh-pages": "^1.0.0", "gitbook-cli": "^2.3.2", + "gitbook-plugin-expandable-chapters": "^0.2.0", "gitbook-plugin-jsfiddle": "^1.0.0", "gitbook-plugin-splitter": "0.0.8", "gitbook-plugin-theme-api": "^1.1.2", From 936d998ef5bbc0cb2e1a830c1cb981b1b6d75470 Mon Sep 17 00:00:00 2001 From: WoodyJang Date: Wed, 30 Aug 2017 09:28:44 +0800 Subject: [PATCH 02/12] =?UTF-8?q?float=5Fcenter=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uidoc/core/layout/float_center.md | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/uidoc/core/layout/float_center.md b/uidoc/core/layout/float_center.md index 2e2c6a7a8..1d3884f87 100644 --- a/uidoc/core/layout/float_center.md +++ b/uidoc/core/layout/float_center.md @@ -1,39 +1,30 @@ - # bi.float_center #### 浮动布局实现的居中容器 {% method %} -[source](https://jsfiddle.net/fineui/8fd2nvkm/) +[source](https://jsfiddle.net/fineui/1vgn555m/) {% common %} ```javascript Demo = {}; -Demo.CenterLayout = BI.inherit(BI.Widget, { +Demo.FloatCenterLayout = BI.inherit(BI.Widget, { props: { - baseCls: "demo-center" + baseCls: "demo-float-center" }, render: function () { return { - type: "bi.center", + type: "bi.float_center", items: [{ type: "bi.label", - text: "Center 1,这里虽然设置label的高度30,但是最终影响高度的是center布局", + text: "floatCenter与center的不同在于,它可以控制最小宽度和最大宽度", cls: "layout-bg1", whiteSpace: "normal" - },{ + }, { type: "bi.label", - text: "Center 2,为了演示label是占满整个的,用了一个whiteSpace:normal", + text: "floatCenter与center的不同在于,它可以控制最小宽度和最大宽度", cls: "layout-bg2", whiteSpace: "normal" - },{ - type: "bi.label", - text: "Center 3", - cls: "layout-bg3" - },{ - type: "bi.label", - text: "Center 4", - cls: "layout-bg5" }], height: 300, hgap: 20, @@ -41,9 +32,9 @@ Demo.CenterLayout = BI.inherit(BI.Widget, { } } }); -BI.shortcut("demo.center_layout", Demo.CenterLayout); +BI.shortcut("demo.float_center", Demo.FloatCenterLayout); BI.createWidget({ - type: 'demo.center_layout', + type: 'demo.float_center', element: "#wrapper", }); @@ -63,6 +54,6 @@ BI.createWidget({ | rgap | 效果相当于容器right-padding值 | number | | 0 | | tgap | 效果相当于容器top-padding值 | number | | 0 | | bgap | 效果相当于容器bottom-padding值 | number | | 0 | -| items | 子控件数组 | array | | | +| items | 子控件数组 | array | | | --- \ No newline at end of file From 658613a876d4843b05ed22e70fdd734a9237ea9e Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 30 Aug 2017 09:43:48 +0800 Subject: [PATCH 03/12] remove paragrah number --- uidoc/book.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uidoc/book.json b/uidoc/book.json index 1e736f4ab..2fcb0b3d2 100644 --- a/uidoc/book.json +++ b/uidoc/book.json @@ -7,7 +7,7 @@ ], "pluginsConfig": { "theme-default": { - "showLevel": true + "showLevel": false }, "jsfiddle": { "type": "script", From b0de1bd75d0c0fecabb754dc20d5f0e2c1e4563a Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 30 Aug 2017 10:39:30 +0800 Subject: [PATCH 04/12] finish bi.table --- uidoc/core/layout/table.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/uidoc/core/layout/table.md b/uidoc/core/layout/table.md index 6c2137ab6..5893f44a9 100644 --- a/uidoc/core/layout/table.md +++ b/uidoc/core/layout/table.md @@ -1,2 +1,37 @@ -# table +# bi.table + +### table作为一个列表集合存在,继承BI.Widget +{% method %} +[source](https://jsfiddle.net/fineui/8t2en619/) + +{% common %} +```javascript +BI.createWidget({ + element: "body", + type: "bi.table", + items: [[]], + columnSize: [100, "fill", 200], + rowSize: [10, 30, 50, 70, 90, 110, 130], + hgap: 20, + vgap: 10 +}); +``` + +{% endmethod %} + +## 参数设置 +| 参数 | 说明 | 类型 | 默认值 | +| ---------- | --------- | ------------ | ------------------ | +| scrolly | 是否出现滚动条 | bool | true | +| columnSize | 列项宽度 | array/number | [200, 200, 'fill'] | +| rowSize | 行高 | array/number | 30 | +| hgap | 内部元素间纵向距离 | number | 0 | +| vgap | 内部元素间横向距离 | number | 0 | +| items | 子项 | array | [] | + +## 方法 +| 方法名 | 说明 | 用法 | +| -------- | ------ | --------------- | +| addItem | 增加内容 | addItem(arr) | +| populate | 更换新的内容 | poplulate(item) | From e014084eddc341da386491bfebfbf7875430f14a Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 30 Aug 2017 10:48:34 +0800 Subject: [PATCH 05/12] minor change --- uidoc/core/layout/table.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/uidoc/core/layout/table.md b/uidoc/core/layout/table.md index 5893f44a9..4ce5c4935 100644 --- a/uidoc/core/layout/table.md +++ b/uidoc/core/layout/table.md @@ -9,7 +9,7 @@ BI.createWidget({ element: "body", type: "bi.table", - items: [[]], + items: [], columnSize: [100, "fill", 200], rowSize: [10, 30, 50, 70, 90, 110, 130], hgap: 20, @@ -20,18 +20,18 @@ BI.createWidget({ {% endmethod %} ## 参数设置 -| 参数 | 说明 | 类型 | 默认值 | -| ---------- | --------- | ------------ | ------------------ | -| scrolly | 是否出现滚动条 | bool | true | -| columnSize | 列项宽度 | array/number | [200, 200, 'fill'] | -| rowSize | 行高 | array/number | 30 | -| hgap | 内部元素间纵向距离 | number | 0 | -| vgap | 内部元素间横向距离 | number | 0 | -| items | 子项 | array | [] | +| 参数 | 说明 | 类型 | 默认值 | +| ---------- | --------- | ------------ | ---------------------------------------- | +| scrolly | 是否出现滚动条 | bool | true | +| columnSize | 列项宽度 | array/number | [200, 200, 'fill'] | +| rowSize | 行高 | array/number | 30 | +| hgap | 内部元素间纵向距离 | number | 0 | +| vgap | 内部元素间横向距离 | number | 0 | +| items | 子项 | array | [{width: 100,el: {type: 'bi.button', text: 'button1'}},{width: 'fill',el: {type: 'bi.button', text: 'button2'}},{width: 200,el: {type: 'bi.button', text: 'button3'}}] | ## 方法 -| 方法名 | 说明 | 用法 | -| -------- | ------ | --------------- | -| addItem | 增加内容 | addItem(arr) | -| populate | 更换新的内容 | poplulate(item) | +| 方法名 | 说明 | 用法 | +| -------- | ------ | ---------------- | +| addItem | 增加内容 | addItem(arr) | +| populate | 更换新的内容 | poplulate(items) | From 7472bbe10f915e570d786ff6b4cabdc2293a30de Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 30 Aug 2017 11:21:30 +0800 Subject: [PATCH 06/12] update detailed tree struct --- uidoc/detailed/tree/bi.multi_tree_combo.md | 18 +++++++++++++----- uidoc/detailed/tree/bi.switch_tree.md | 21 ++++++++++++--------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/uidoc/detailed/tree/bi.multi_tree_combo.md b/uidoc/detailed/tree/bi.multi_tree_combo.md index c0287ef69..5c5bb86cf 100644 --- a/uidoc/detailed/tree/bi.multi_tree_combo.md +++ b/uidoc/detailed/tree/bi.multi_tree_combo.md @@ -1,6 +1,6 @@ # bi.multi_tree_combo -### 树下拉框 +### 树下拉框,继承BI.Widget {% method %} [source](https://jsfiddle.net/fineui/caw7efpf/) @@ -54,9 +54,17 @@ BI.createWidget({ {% endmethod %} ## 参数设置 -| 参数 | 说明 | 类型 | 默认值 | -| ----- | ------------- | ----- | ---- | -| items | 子项,pId代表父节点ID | array | [] | +| 参数 | 说明 | 类型 | 默认值 | +| ------------ | ------------- | -------- | ------------- | +| width | 宽度 | number | 200 | +| height | 高度 | number | 30 | +| items | 子项,pId代表父节点ID | array | null | +| itemsCreator | 子项创建函数 | function | function() {} | ## 方法 -### 通用方法参见[Tree](#)方法 \ No newline at end of file +| 方法名 | 说明 | 用法 | +| -------- | ------- | --------------- | +| setValue | 设置文本框值 | setValue(v) | +| getValue | 获取文本框值 | getValue() | +| populate | 更改树结构内容 | populate(items) | + diff --git a/uidoc/detailed/tree/bi.switch_tree.md b/uidoc/detailed/tree/bi.switch_tree.md index 6d1e7645b..6df36d1da 100644 --- a/uidoc/detailed/tree/bi.switch_tree.md +++ b/uidoc/detailed/tree/bi.switch_tree.md @@ -1,6 +1,6 @@ # bi.switch_tree -### 可切换树 +### 可以单选多选切换的树,继承BI.Widget {% method %} [source](https://jsfiddle.net/fineui/crd4z1nd/) @@ -8,17 +8,17 @@ {% common %} ```javascript var items = [{ - id: -1, + id: -1, pId: -2, value: "根目录", text: "根目录" }, { - id: 1, + id: 1, pId: -1, value: "第一级目录1", text: "第一级目录1" }, { - id: 11, + id: 11, pId: 1, value: "第二级文件1", text: "第二级文件1" @@ -38,11 +38,14 @@ var tree = BI.createWidget({ | items | 子项,pId代表父节点ID | array | [] | ## 方法 -### 通用方法参见[Tree](#)方法 - -| 方法名 | 说明 | 用法 | -| ------------ | ----- | ------------ | -| switchSelect | 切换树结构 | switchSelect | +| 方法名 | 说明 | 用法 | +| ------------ | --------- | ------------ | +| switchSelect | 切换树结构 | switchSelect | +| setSelect | 设置选中项 | setSelect(v) | +| getSelect | 获取选中项 | getSelect() | +| setValue | 设置当前选中项内容 | setValue(v) | +| getValue | 获取当前选中项内容 | getValue(v) | +| populate | 更新内容 | populate(items) | From af81e5f6f05f2bcaeddc19f7249f61900b532e1e Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 30 Aug 2017 11:29:09 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E8=A1=A5=E4=B8=80=E4=B8=8B=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uidoc/SUMMARY.md | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/uidoc/SUMMARY.md b/uidoc/SUMMARY.md index 5660db4fd..c5264f404 100644 --- a/uidoc/SUMMARY.md +++ b/uidoc/SUMMARY.md @@ -138,14 +138,42 @@ * [各种节点nodes](detailed/bi.button/node.md) * [各种segment](detailed/bi.button/segment.md) * 树形结构 - * [bi.multi_tree_combo](detailed/tree/bi.multi_tree_combo.md) - * [bi.switch_tree](detailed/tree/bi.switch_tree.md) + * [multi_tree_combo](detailed/tree/bi.multi_tree_combo.md) + * [switch_tree](detailed/tree/bi.switch_tree.md) * 表格 - * [bi.preview_table](detailed/table/bi.preview_table.md) - * [bi.responsive_table](detailed/table/bi.responsive_table.md) - * [bi.excel_table](detailed/table/bi.excel_table.md) + * [preview_table](detailed/table/bi.preview_table.md) + * [responsive_table](detailed/table/bi.responsive_table.md) + * [excel_table](detailed/table/bi.excel_table.md) + * [page_table](detailed/table/bi.page_table.md) * 文本框控件 * [bi.text_editor](detailed/text_input/bi.text_editor.md) * [bi.search_editor](detailed/text_input/bi.search_editor.md) * [bi.clear_editor](detailed/text_input/bi.clear_editor.md) + * [finetuning_number_editor](detailed/text_input/finetuning_number_editor.md) +* [year_combo](detailed/year_combo.md) +* [month_combo](detailed/month_combo.md) +* [quarter_combo](detailed/quarter_combo.md) +* [down_list_combo](detailed/down_list_combo.md) +* [numeric_interval](detailed/numeric_interval.md) +* [multi_select_combo](detailed/multi_select_combo.md) +* 简单日期控件 + * [date_combo](detailed/date/date_combo.md) + * [date_pane_widget](detailed/date/date_pane_widget.md) + * [year_month_combo](detailed/date/year_month_combo.md) + * [year_quarter_combo](detailed/date/year_quarter_combo.md) + * [custom_date_time](detailed/date/custom_date_time.md) +* 简单下拉树 + * [single_tree_combo](detailed/combo/single_tree_combo.md) + * [multilayer_single_tree_combo](detailed/combo/multilayer_single_tree_combo.md) + * [select_tree_combo](detailed/combo/select_tree_combo.md) + * [multilayer_select_tree_combo](detailed/combo/multilayer_select_tree_combo.md) +* 路径选择 + * [path_chooser](detailed/path/path_chooser.md) + * [direction_path_chooser](detailed/path/direction_path_chooser.md) +* [relation_view](detailed/relation_view.md) +* [dialog](detailed/dialog.md) +* [file_manager](detailed/file_manager.md) + + + From ad485a57a1627fb4a6caece5be8f80bf1d2bba81 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 30 Aug 2017 11:47:16 +0800 Subject: [PATCH 08/12] update --- uidoc/SUMMARY.md | 3 --- uidoc/detailed/combo/multilayer_select_tree_combo.md | 2 ++ uidoc/detailed/combo/multilayer_single_tree_combo.md | 2 ++ uidoc/detailed/combo/select_tree_combo.md | 2 ++ uidoc/detailed/combo/single_tree_combo.md | 2 ++ uidoc/detailed/date/custom_date_time.md | 2 ++ uidoc/detailed/date/date_combo.md | 2 ++ uidoc/detailed/date/date_pane_widget.md | 2 ++ uidoc/detailed/date/year_month_combo.md | 2 ++ uidoc/detailed/date/year_quarter_combo.md | 2 ++ uidoc/detailed/dialog.md | 2 ++ uidoc/detailed/down_list_combo.md | 2 ++ uidoc/detailed/file_manager.md | 2 ++ uidoc/detailed/month_combo.md | 2 ++ uidoc/detailed/multi_select_combo.md | 2 ++ uidoc/detailed/numeric_interval.md | 2 ++ uidoc/detailed/path/direction_path_chooser.md | 2 ++ uidoc/detailed/path/path_chooser.md | 2 ++ uidoc/detailed/quarter_combo.md | 2 ++ uidoc/detailed/relation_view.md | 2 ++ uidoc/detailed/table/bi.page_table.md | 2 ++ uidoc/detailed/text_input/finetuning_number_editor.md | 2 ++ uidoc/detailed/year_combo.md | 2 ++ 23 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 uidoc/detailed/combo/multilayer_select_tree_combo.md create mode 100644 uidoc/detailed/combo/multilayer_single_tree_combo.md create mode 100644 uidoc/detailed/combo/select_tree_combo.md create mode 100644 uidoc/detailed/combo/single_tree_combo.md create mode 100644 uidoc/detailed/date/custom_date_time.md create mode 100644 uidoc/detailed/date/date_combo.md create mode 100644 uidoc/detailed/date/date_pane_widget.md create mode 100644 uidoc/detailed/date/year_month_combo.md create mode 100644 uidoc/detailed/date/year_quarter_combo.md create mode 100644 uidoc/detailed/dialog.md create mode 100644 uidoc/detailed/down_list_combo.md create mode 100644 uidoc/detailed/file_manager.md create mode 100644 uidoc/detailed/month_combo.md create mode 100644 uidoc/detailed/multi_select_combo.md create mode 100644 uidoc/detailed/numeric_interval.md create mode 100644 uidoc/detailed/path/direction_path_chooser.md create mode 100644 uidoc/detailed/path/path_chooser.md create mode 100644 uidoc/detailed/quarter_combo.md create mode 100644 uidoc/detailed/relation_view.md create mode 100644 uidoc/detailed/table/bi.page_table.md create mode 100644 uidoc/detailed/text_input/finetuning_number_editor.md create mode 100644 uidoc/detailed/year_combo.md diff --git a/uidoc/SUMMARY.md b/uidoc/SUMMARY.md index c5264f404..04bf47fb7 100644 --- a/uidoc/SUMMARY.md +++ b/uidoc/SUMMARY.md @@ -174,6 +174,3 @@ * [dialog](detailed/dialog.md) * [file_manager](detailed/file_manager.md) - - - diff --git a/uidoc/detailed/combo/multilayer_select_tree_combo.md b/uidoc/detailed/combo/multilayer_select_tree_combo.md new file mode 100644 index 000000000..63d7bc4a9 --- /dev/null +++ b/uidoc/detailed/combo/multilayer_select_tree_combo.md @@ -0,0 +1,2 @@ +# multilayer_select_tree_combo + diff --git a/uidoc/detailed/combo/multilayer_single_tree_combo.md b/uidoc/detailed/combo/multilayer_single_tree_combo.md new file mode 100644 index 000000000..5fe7cf833 --- /dev/null +++ b/uidoc/detailed/combo/multilayer_single_tree_combo.md @@ -0,0 +1,2 @@ +# multilayer_single_tree_combo + diff --git a/uidoc/detailed/combo/select_tree_combo.md b/uidoc/detailed/combo/select_tree_combo.md new file mode 100644 index 000000000..13b21ef6b --- /dev/null +++ b/uidoc/detailed/combo/select_tree_combo.md @@ -0,0 +1,2 @@ +# select_tree_combo + diff --git a/uidoc/detailed/combo/single_tree_combo.md b/uidoc/detailed/combo/single_tree_combo.md new file mode 100644 index 000000000..1b3a4ce61 --- /dev/null +++ b/uidoc/detailed/combo/single_tree_combo.md @@ -0,0 +1,2 @@ +# single_tree_combo + diff --git a/uidoc/detailed/date/custom_date_time.md b/uidoc/detailed/date/custom_date_time.md new file mode 100644 index 000000000..6491740b6 --- /dev/null +++ b/uidoc/detailed/date/custom_date_time.md @@ -0,0 +1,2 @@ +# custom_date_time + diff --git a/uidoc/detailed/date/date_combo.md b/uidoc/detailed/date/date_combo.md new file mode 100644 index 000000000..fa5199b1c --- /dev/null +++ b/uidoc/detailed/date/date_combo.md @@ -0,0 +1,2 @@ +# date_combo + diff --git a/uidoc/detailed/date/date_pane_widget.md b/uidoc/detailed/date/date_pane_widget.md new file mode 100644 index 000000000..576e0209a --- /dev/null +++ b/uidoc/detailed/date/date_pane_widget.md @@ -0,0 +1,2 @@ +# date_pane_widget + diff --git a/uidoc/detailed/date/year_month_combo.md b/uidoc/detailed/date/year_month_combo.md new file mode 100644 index 000000000..5cdcd4a57 --- /dev/null +++ b/uidoc/detailed/date/year_month_combo.md @@ -0,0 +1,2 @@ +# year_month_combo + diff --git a/uidoc/detailed/date/year_quarter_combo.md b/uidoc/detailed/date/year_quarter_combo.md new file mode 100644 index 000000000..3858dccd2 --- /dev/null +++ b/uidoc/detailed/date/year_quarter_combo.md @@ -0,0 +1,2 @@ +# year_quarter_combo + diff --git a/uidoc/detailed/dialog.md b/uidoc/detailed/dialog.md new file mode 100644 index 000000000..8c41f6d9c --- /dev/null +++ b/uidoc/detailed/dialog.md @@ -0,0 +1,2 @@ +# dialog + diff --git a/uidoc/detailed/down_list_combo.md b/uidoc/detailed/down_list_combo.md new file mode 100644 index 000000000..729a1e2e5 --- /dev/null +++ b/uidoc/detailed/down_list_combo.md @@ -0,0 +1,2 @@ +# down_list_combo + diff --git a/uidoc/detailed/file_manager.md b/uidoc/detailed/file_manager.md new file mode 100644 index 000000000..0ba990ce2 --- /dev/null +++ b/uidoc/detailed/file_manager.md @@ -0,0 +1,2 @@ +# file_manager + diff --git a/uidoc/detailed/month_combo.md b/uidoc/detailed/month_combo.md new file mode 100644 index 000000000..9a5dbe9c8 --- /dev/null +++ b/uidoc/detailed/month_combo.md @@ -0,0 +1,2 @@ +# month_combo + diff --git a/uidoc/detailed/multi_select_combo.md b/uidoc/detailed/multi_select_combo.md new file mode 100644 index 000000000..dee3ccbbe --- /dev/null +++ b/uidoc/detailed/multi_select_combo.md @@ -0,0 +1,2 @@ +# multi_select_combo + diff --git a/uidoc/detailed/numeric_interval.md b/uidoc/detailed/numeric_interval.md new file mode 100644 index 000000000..0a249e065 --- /dev/null +++ b/uidoc/detailed/numeric_interval.md @@ -0,0 +1,2 @@ +# numeric_interval + diff --git a/uidoc/detailed/path/direction_path_chooser.md b/uidoc/detailed/path/direction_path_chooser.md new file mode 100644 index 000000000..5aa629be3 --- /dev/null +++ b/uidoc/detailed/path/direction_path_chooser.md @@ -0,0 +1,2 @@ +# direction_path_chooser + diff --git a/uidoc/detailed/path/path_chooser.md b/uidoc/detailed/path/path_chooser.md new file mode 100644 index 000000000..d3a9e8708 --- /dev/null +++ b/uidoc/detailed/path/path_chooser.md @@ -0,0 +1,2 @@ +# path_chooser + diff --git a/uidoc/detailed/quarter_combo.md b/uidoc/detailed/quarter_combo.md new file mode 100644 index 000000000..80ed82dbe --- /dev/null +++ b/uidoc/detailed/quarter_combo.md @@ -0,0 +1,2 @@ +# quarter_combo + diff --git a/uidoc/detailed/relation_view.md b/uidoc/detailed/relation_view.md new file mode 100644 index 000000000..8a5149a4c --- /dev/null +++ b/uidoc/detailed/relation_view.md @@ -0,0 +1,2 @@ +# relation_view + diff --git a/uidoc/detailed/table/bi.page_table.md b/uidoc/detailed/table/bi.page_table.md new file mode 100644 index 000000000..4ae133c14 --- /dev/null +++ b/uidoc/detailed/table/bi.page_table.md @@ -0,0 +1,2 @@ +# page_table + diff --git a/uidoc/detailed/text_input/finetuning_number_editor.md b/uidoc/detailed/text_input/finetuning_number_editor.md new file mode 100644 index 000000000..7ecf9cab0 --- /dev/null +++ b/uidoc/detailed/text_input/finetuning_number_editor.md @@ -0,0 +1,2 @@ +# finetuning_number_editor + diff --git a/uidoc/detailed/year_combo.md b/uidoc/detailed/year_combo.md new file mode 100644 index 000000000..6c6056ef3 --- /dev/null +++ b/uidoc/detailed/year_combo.md @@ -0,0 +1,2 @@ +# year_combo + From 0bf110ba831d66ed2284157aba8b22f17227f62c Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 30 Aug 2017 13:45:12 +0800 Subject: [PATCH 09/12] finish detailed table --- uidoc/detailed/table/bi.excel_table.md | 31 +++++++++++++++++++-- uidoc/detailed/table/bi.preview_table.md | 30 ++++++++++++++++++-- uidoc/detailed/table/bi.responsive_table.md | 29 +++++++++++++++++-- 3 files changed, 82 insertions(+), 8 deletions(-) diff --git a/uidoc/detailed/table/bi.excel_table.md b/uidoc/detailed/table/bi.excel_table.md index e3b37d3bf..0e77ff625 100644 --- a/uidoc/detailed/table/bi.excel_table.md +++ b/uidoc/detailed/table/bi.excel_table.md @@ -1,6 +1,6 @@ # bi.excel_table -### 类似excel式的表格 +### 类似excel式的表格,继承BI.Widget {% method %} [source](https://jsfiddle.net/fineui/cbmv07g4/) @@ -48,11 +48,36 @@ BI.createWidget({ | headerRowSize | 表头高度 | number | 37 | | footerRowSize | 表尾高度 | number | 37 | | rowSize | 普通单元格高度 | number | 37 | -| regionColumnSize | | bool | false | +| regionColumnSize | 列项间的 | array | [82, ""] | | items | 子组件 | array | [] | ## 方法 -### 参见[Table](#)方法 +| 方法名 | 说明 | 用法 | +| ---------------------------- | ---------------- | ------------------------------------ | +| resize | 调整表格 | resize() | +| setColumnSize | 设置列宽 | setColumnSize(columnSize) | +| getColumnSize | 得到列宽 | getColumnSize() | +| getCalculateColumnSize | 获得计算后的列宽 | getCalculateColumnSize() | +| setHeaderColumnSize | 设置表头的列宽 | setHeaderColumnSize(columnSize) | +| setRegionColumnSize | 设置列项之间的间隙 | setRegionColumnSize(columnSize) | +| getRegionColumnSize | 获得列项之间的间隙 | getRegionColumnSize() | +| getCalculateRegionColumnSize | 获取计算后的列项之间的间隙 | getCalculateRegionColumnSize() | +| getCalculateRegionRowSize | 获取计算后的列项上下之间的间隙 | getCalculateRegionRowSize() | +| getClientRegionColumnSize | 获取浏览器中显示的列项之间的间隙 | getClientRegionColumnSize() | +| getScrollRegionColumnSize | 获取横向滚动条宽度 | getScrollRegionColumnSize() | +| getScrollRegionRowSize | 获取纵向滚动条宽度 | getScrollRegionRowSize() | +| hasVerticalScroll | 是否含有数值滚动条 | hasVerticalScroll() | +| setVerticalScroll | 设置纵向滚动距离 | setVerticalScroll(scrollTop) | +| setLeftHorizontalScroll | 设置左到右横向滚动距离 | setLeftHorizontalScroll(scrollLeft) | +| setRightHorizontalScroll | 设置右往左横向滚动距离 | setRightHorizontalScroll(scrollLeft) | +| getVerticalScroll | 获取纵向滚动距离 | getVerticalScroll() | +| getLeftHorizontalScroll | 获取左到右横向滚动距离 | getLeftHorizontalScroll() | +| getRightHorizontalScroll | 获取右往左横向滚动距离 | getRightHorizontalScroll() | +| getColumns | 获取列项 | getColumns() | +| resizeHeader | 调整表头 | resizeHeader() | +| attr | 设置属性 | attr(key, value) | +| populate | 增加行 | populate(rows) | +| destroy | 摧毁表 | destroy() | diff --git a/uidoc/detailed/table/bi.preview_table.md b/uidoc/detailed/table/bi.preview_table.md index 32759da07..4325fc1dd 100644 --- a/uidoc/detailed/table/bi.preview_table.md +++ b/uidoc/detailed/table/bi.preview_table.md @@ -1,6 +1,6 @@ # bi.preview_table -### 用于表格预览 +### 用于表格预览,继承BI.Widget {% method %} [source](https://jsfiddle.net/fineui/po4s0hub/) @@ -47,5 +47,29 @@ BI.createWidget({ | items | 子组件 | array | [] | ## 方法 -### 参见[Table](#)方法 - +| 方法名 | 说明 | 用法 | +| ---------------------------- | ---------------- | ------------------------------------ | +| resize | 调整表格 | resize() | +| setColumnSize | 设置列宽 | setColumnSize(columnSize) | +| getColumnSize | 得到列宽 | getColumnSize() | +| getCalculateColumnSize | 获得计算后的列宽 | getCalculateColumnSize() | +| setHeaderColumnSize | 设置表头的列宽 | setHeaderColumnSize(columnSize) | +| setRegionColumnSize | 设置列项之间的间隙 | setRegionColumnSize(columnSize) | +| getRegionColumnSize | 获得列项之间的间隙 | getRegionColumnSize() | +| getCalculateRegionColumnSize | 获取计算后的列项之间的间隙 | getCalculateRegionColumnSize() | +| getCalculateRegionRowSize | 获取计算后的列项上下之间的间隙 | getCalculateRegionRowSize() | +| getClientRegionColumnSize | 获取浏览器中显示的列项之间的间隙 | getClientRegionColumnSize() | +| getScrollRegionColumnSize | 获取横向滚动条宽度 | getScrollRegionColumnSize() | +| getScrollRegionRowSize | 获取纵向滚动条宽度 | getScrollRegionRowSize() | +| hasVerticalScroll | 是否含有数值滚动条 | hasVerticalScroll() | +| setVerticalScroll | 设置纵向滚动距离 | setVerticalScroll(scrollTop) | +| setLeftHorizontalScroll | 设置左到右横向滚动距离 | setLeftHorizontalScroll(scrollLeft) | +| setRightHorizontalScroll | 设置右往左横向滚动距离 | setRightHorizontalScroll(scrollLeft) | +| getVerticalScroll | 获取纵向滚动距离 | getVerticalScroll() | +| getLeftHorizontalScroll | 获取左到右横向滚动距离 | getLeftHorizontalScroll() | +| getRightHorizontalScroll | 获取右往左横向滚动距离 | getRightHorizontalScroll() | +| getColumns | 获取列项 | getColumns() | +| resizeHeader | 调整表头 | resizeHeader() | +| attr | 设置属性 | attr(key, value) | +| populate | 增加行 | populate(rows) | +| destroy | 摧毁表 | destroy() | \ No newline at end of file diff --git a/uidoc/detailed/table/bi.responsive_table.md b/uidoc/detailed/table/bi.responsive_table.md index 73fe4a964..22987c498 100644 --- a/uidoc/detailed/table/bi.responsive_table.md +++ b/uidoc/detailed/table/bi.responsive_table.md @@ -1,6 +1,6 @@ # bi.responsive_table -### 自适应宽度的表格 +### 自适应宽度的表格,继承BI.Widget {% method %} [source](https://jsfiddle.net/fineui/y70jwztm/) @@ -58,4 +58,29 @@ BI.createWidget({ | crossItems | 交叉表内容二维数组 | array | [] | ## 方法 -### 参见[Table](#)方法 \ No newline at end of file +| 方法名 | 说明 | 用法 | +| ---------------------------- | ---------------- | ------------------------------------ | +| resize | 调整表格 | resize() | +| setColumnSize | 设置列宽 | setColumnSize(columnSize) | +| getColumnSize | 得到列宽 | getColumnSize() | +| getCalculateColumnSize | 获得计算后的列宽 | getCalculateColumnSize() | +| setHeaderColumnSize | 设置表头的列宽 | setHeaderColumnSize(columnSize) | +| setRegionColumnSize | 设置列项之间的间隙 | setRegionColumnSize(columnSize) | +| getRegionColumnSize | 获得列项之间的间隙 | getRegionColumnSize() | +| getCalculateRegionColumnSize | 获取计算后的列项之间的间隙 | getCalculateRegionColumnSize() | +| getCalculateRegionRowSize | 获取计算后的列项上下之间的间隙 | getCalculateRegionRowSize() | +| getClientRegionColumnSize | 获取浏览器中显示的列项之间的间隙 | getClientRegionColumnSize() | +| getScrollRegionColumnSize | 获取横向滚动条宽度 | getScrollRegionColumnSize() | +| getScrollRegionRowSize | 获取纵向滚动条宽度 | getScrollRegionRowSize() | +| hasVerticalScroll | 是否含有数值滚动条 | hasVerticalScroll() | +| setVerticalScroll | 设置纵向滚动距离 | setVerticalScroll(scrollTop) | +| setLeftHorizontalScroll | 设置左到右横向滚动距离 | setLeftHorizontalScroll(scrollLeft) | +| setRightHorizontalScroll | 设置右往左横向滚动距离 | setRightHorizontalScroll(scrollLeft) | +| getVerticalScroll | 获取纵向滚动距离 | getVerticalScroll() | +| getLeftHorizontalScroll | 获取左到右横向滚动距离 | getLeftHorizontalScroll() | +| getRightHorizontalScroll | 获取右往左横向滚动距离 | getRightHorizontalScroll() | +| getColumns | 获取列项 | getColumns() | +| resizeHeader | 调整表头 | resizeHeader() | +| attr | 设置属性 | attr(key, value) | +| populate | 增加行 | populate(rows) | +| destroy | 摧毁表 | destroy() | \ No newline at end of file From 53623b9707dbcb7ddf894d43671eecccf3040321 Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 30 Aug 2017 14:41:40 +0800 Subject: [PATCH 10/12] update layout --- uidoc/core/layout/table.md | 2 +- uidoc/core/layout/td.md | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/uidoc/core/layout/table.md b/uidoc/core/layout/table.md index 4ce5c4935..dad1f1ca3 100644 --- a/uidoc/core/layout/table.md +++ b/uidoc/core/layout/table.md @@ -31,7 +31,7 @@ BI.createWidget({ ## 方法 | 方法名 | 说明 | 用法 | -| -------- | ------ | ---------------- | +| :------- | ------ | ---------------- | | addItem | 增加内容 | addItem(arr) | | populate | 更换新的内容 | poplulate(items) | diff --git a/uidoc/core/layout/td.md b/uidoc/core/layout/td.md index e008e91ab..53f047f5d 100644 --- a/uidoc/core/layout/td.md +++ b/uidoc/core/layout/td.md @@ -1,2 +1,38 @@ -# td +# bi.td + +### 单元格控件,继承BI.Layout + +{% method %} +[source](https://jsfiddle.net/fineui/v4jrz6a3/) + +{% common %} +```javascript +BI.createWidget({ + type: "bi.td", + element: 'body', + columnSize: [20, 20, 'fill'], + items: [] +}); +``` + +{% endmethod %} + + + +##参数 + +| 参数 | 说明 | 类型 | 默认值 | +| ---------- | ---- | ------ | ---------------------------------------- | +| columnSize | 列宽 | array | [200, 200, 200] | +| hgap | 纵向间隙 | number | 0 | +| vgap | 横向间隙 | number | 0 | +| items | 内容项 | array | [[{el: {text: 'label1'}},{ el: {text: 'label2'},{ el: {text: 'label3'} | + + +## 方法 + +| 方法名 | 说明 | 用法 | +| -------- | ------ | ---------------- | +| addItem | 增加内容 | addItem(arr) | +| populate | 更换新的内容 | poplulate(items) | From 7d1544a773a17c80a897c640fa831ed185d2492d Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 30 Aug 2017 14:44:49 +0800 Subject: [PATCH 11/12] update --- demo/version.js | 8 ++++++++ public/js/index.js | 8 ++++++++ uidoc/detailed/bi.multi_select_item.md | 2 -- uidoc/detailed/bi.segment.md | 2 -- uidoc/detailed/bi.single_select_item.md | 2 -- 5 files changed, 16 insertions(+), 6 deletions(-) delete mode 100644 uidoc/detailed/bi.multi_select_item.md delete mode 100644 uidoc/detailed/bi.segment.md delete mode 100644 uidoc/detailed/bi.single_select_item.md diff --git a/demo/version.js b/demo/version.js index 6b336ba16..36b1da1f4 100644 --- a/demo/version.js +++ b/demo/version.js @@ -18,4 +18,12 @@ BI.i18n = { "BI-Basic_Simple_Thursday": "四", "BI-Basic_Simple_Friday": "五", "BI-Basic_Simple_Saturday": "六", + "BI-Multi_Date_Year": "年", + "BI-Multi_Date_Month": "月", + "BI-Multi_Date_Quarter": "季度", + "BI-Basic_Unrestricted": "无限制", + "BI-Quarter_1": "第1季度", + "BI-Quarter_2": "第2季度", + "BI-Quarter_3": "第3季度", + "BI-Quarter_4": "第4季度" }; \ No newline at end of file diff --git a/public/js/index.js b/public/js/index.js index 1cf6d8bf8..9f45ca30e 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -13,4 +13,12 @@ BI.i18n = { "BI-Basic_Simple_Thursday": "四", "BI-Basic_Simple_Friday": "五", "BI-Basic_Simple_Saturday": "六", + "BI-Multi_Date_Year": "年", + "BI-Multi_Date_Month": "月", + "BI-Multi_Date_Quarter": "季度", + "BI-Basic_Unrestricted": "无限制", + "BI-Quarter_1": "第1季度", + "BI-Quarter_2": "第2季度", + "BI-Quarter_3": "第3季度", + "BI-Quarter_4": "第4季度" }; \ No newline at end of file diff --git a/uidoc/detailed/bi.multi_select_item.md b/uidoc/detailed/bi.multi_select_item.md deleted file mode 100644 index 562f554c4..000000000 --- a/uidoc/detailed/bi.multi_select_item.md +++ /dev/null @@ -1,2 +0,0 @@ -# 复选框 - diff --git a/uidoc/detailed/bi.segment.md b/uidoc/detailed/bi.segment.md deleted file mode 100644 index 541ac523f..000000000 --- a/uidoc/detailed/bi.segment.md +++ /dev/null @@ -1,2 +0,0 @@ -# segment组件 - diff --git a/uidoc/detailed/bi.single_select_item.md b/uidoc/detailed/bi.single_select_item.md deleted file mode 100644 index ff75eac3a..000000000 --- a/uidoc/detailed/bi.single_select_item.md +++ /dev/null @@ -1,2 +0,0 @@ -# 单选框 - From 55ec171a6b72795908bc8363728e8a6b09df6c4c Mon Sep 17 00:00:00 2001 From: iapyang Date: Wed, 30 Aug 2017 15:16:12 +0800 Subject: [PATCH 12/12] update bi.table_view --- uidoc/base/table/table_view.md | 66 +++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/uidoc/base/table/table_view.md b/uidoc/base/table/table_view.md index a59001bdb..2af338b73 100644 --- a/uidoc/base/table/table_view.md +++ b/uidoc/base/table/table_view.md @@ -1,2 +1,66 @@ -# table_view +# bi.table_view +### 表格展示控件 + +{% method %} +[source](https://jsfiddle.net/fineui/mbazb80a/) + +{% common %} +```javascript +BI.createWidget({ + type: "bi.table_view", + element: 'body', + isNeedMerge: true, + isNeedFreeze: true, + freezeCols: [0, 1], + mergeCols: [0, 1], + columnSize: [100, 200, 300, 400, 500], + items: [], + header: [] +}); +``` + +{% endmethod %} + +## 参数设置 +| 参数 | 说明 | 类型 | 默认值 | +| ---------------- | ------------- | -------------------- | ----------------- | +| isNeedResize | 是否需要调整大小 | bool | false | +| isResizeAdapt | 是否调整时自适应 | bool | true | +| isNeedMerge | 是否需要合并单元格 | bool | false | +| mergeCols | 合并的单元格列号 | array | [] | +| mergeRule | 合并规则, 默认相等时合并 | function(row1, row2) | 默认row1 = row2 时合并 | +| columnSize | 单元格宽度集合 | array | [] | +| headerRowSize | 表头高度 | number | 37 | +| footerRowSize | 表尾高度 | number | 37 | +| rowSize | 普通单元格高度 | number | 37 | +| regionColumnSize | 列项间的 | array | [82, ""] | +| items | 子组件 | array | [] | + +## 方法 +| 方法名 | 说明 | 用法 | +| ---------------------------- | ---------------- | ------------------------------------ | +| resize | 调整表格 | resize() | +| setColumnSize | 设置列宽 | setColumnSize(columnSize) | +| getColumnSize | 得到列宽 | getColumnSize() | +| getCalculateColumnSize | 获得计算后的列宽 | getCalculateColumnSize() | +| setHeaderColumnSize | 设置表头的列宽 | setHeaderColumnSize(columnSize) | +| setRegionColumnSize | 设置列项之间的间隙 | setRegionColumnSize(columnSize) | +| getRegionColumnSize | 获得列项之间的间隙 | getRegionColumnSize() | +| getCalculateRegionColumnSize | 获取计算后的列项之间的间隙 | getCalculateRegionColumnSize() | +| getCalculateRegionRowSize | 获取计算后的列项上下之间的间隙 | getCalculateRegionRowSize() | +| getClientRegionColumnSize | 获取浏览器中显示的列项之间的间隙 | getClientRegionColumnSize() | +| getScrollRegionColumnSize | 获取横向滚动条宽度 | getScrollRegionColumnSize() | +| getScrollRegionRowSize | 获取纵向滚动条宽度 | getScrollRegionRowSize() | +| hasVerticalScroll | 是否含有数值滚动条 | hasVerticalScroll() | +| setVerticalScroll | 设置纵向滚动距离 | setVerticalScroll(scrollTop) | +| setLeftHorizontalScroll | 设置左到右横向滚动距离 | setLeftHorizontalScroll(scrollLeft) | +| setRightHorizontalScroll | 设置右往左横向滚动距离 | setRightHorizontalScroll(scrollLeft) | +| getVerticalScroll | 获取纵向滚动距离 | getVerticalScroll() | +| getLeftHorizontalScroll | 获取左到右横向滚动距离 | getLeftHorizontalScroll() | +| getRightHorizontalScroll | 获取右往左横向滚动距离 | getRightHorizontalScroll() | +| getColumns | 获取列项 | getColumns() | +| resizeHeader | 调整表头 | resizeHeader() | +| attr | 设置属性 | attr(key, value) | +| populate | 增加行 | populate(rows) | +| destroy | 摧毁表 | destroy() |