From 65c67ff3a442952680b017f72cdd01f7e07e0b8a Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 6 Sep 2017 21:14:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/demo.js | 30 ++++++----- uidoc/base/button/image_button.md | 2 +- uidoc/base/table/collection_table.md | 2 +- uidoc/case/button/single_select_item.md | 2 +- uidoc/case/combo/formula_combo.md | 38 ------------- uidoc/case/combo/icon_combo.md | 2 +- uidoc/case/combo/static_combo.md | 2 +- uidoc/case/combo/text_value_combo.md | 53 +++++++++++++++++++ uidoc/case/combo/text_value_downlist_combo.md | 2 +- uidoc/case/editor/shelter_editor.md | 2 +- uidoc/case/editor/sign_initial_editor.md | 2 +- uidoc/case/loader/lazy_loader.md | 2 +- uidoc/case/loader/list_loader.md | 2 +- uidoc/case/tree/display_tree.md | 2 +- uidoc/core/abstract/collection_view.md | 2 +- uidoc/core/abstract/grid_view.md | 2 +- uidoc/core/abstract/virtual_group.md | 4 +- uidoc/core/abstract/virtual_list.md | 2 +- uidoc/core/combination/bi.expander.md | 35 ++++++++++++ uidoc/core/combination/group_combo.md | 42 ++++++++++++++- uidoc/core/combination/loader.md | 22 ++++++++ uidoc/core/layout/inline.md | 2 - uidoc/detailed/slider.md | 5 +- 23 files changed, 188 insertions(+), 71 deletions(-) delete mode 100644 uidoc/case/combo/formula_combo.md create mode 100644 uidoc/case/combo/text_value_combo.md delete mode 100644 uidoc/core/layout/inline.md diff --git a/dist/demo.js b/dist/demo.js index 48368cd2e..59456c202 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -29,7 +29,8 @@ BI.i18n = { "BI-Basic_Value": "值", "BI-Load_More": "加载更多", "BI-Select_All": "全选", - "BI-No_More_Data": "无更多数据" + "BI-No_More_Data": "无更多数据", + "BI-No_Selected_Value": "没有可选项" };$(function () { var ref; BI.createWidget({ @@ -7657,21 +7658,26 @@ Demo.FileManager = BI.inherit(BI.Widget, { lastModify: 1454316355142 }]; var filemanager = BI.createWidget({ - type: "bi.file_manager", - items: items + type: "bi.fine_tuning_number_editor", + validationChecker: function (v) { + return BI.parseFloat(v) <= 100 && BI.parseFloat(v) >= 0 + }, + height: 24, + width: 150, + errorText: "hahah" + }); + filemanager.on(BI.FineTuningNumberEditor.EVENT_CHANGE, function () { + if(BI.parseFloat(this.getValue()) < 1){ + filemanager.setBottomEnable(false); + }else{ + filemanager.setBottomEnable(true); + } }); return { - type: "bi.vtape", + type: "bi.vertical", items: [{ el: filemanager, - height: "fill" - }, { - type: "bi.button", - text: "getValue", - handler: function () { - BI.Msg.alert("", JSON.stringify(filemanager.getValue())); - }, - height: 25 + height: 24 }] } } diff --git a/uidoc/base/button/image_button.md b/uidoc/base/button/image_button.md index 75749dea2..e30b66be4 100644 --- a/uidoc/base/button/image_button.md +++ b/uidoc/base/button/image_button.md @@ -9,7 +9,7 @@ ```javascript BI.createWidget({ - type: 'bi.image_button', + type: 'bi.image_button', src: "http://www.easyicon.net/api/resizeApi.php?id=1206741&size=128", width: 100, height: 100 diff --git a/uidoc/base/table/collection_table.md b/uidoc/base/table/collection_table.md index fe98036a8..81679f78d 100644 --- a/uidoc/base/table/collection_table.md +++ b/uidoc/base/table/collection_table.md @@ -1,6 +1,6 @@ # bi.collection_table -### 继承BI.Widget +### 基本的表格 继承BI.Widget {% method %} [source](https://jsfiddle.net/fineui/x2zxfzhp/) diff --git a/uidoc/case/button/single_select_item.md b/uidoc/case/button/single_select_item.md index 811f07a26..56facc4d5 100644 --- a/uidoc/case/button/single_select_item.md +++ b/uidoc/case/button/single_select_item.md @@ -1,6 +1,6 @@ # bi.single_select_item -## 复选框item,基类[BI.BasicButton](/core/basic_button.md) +## 可以点击的label,基类[BI.BasicButton](/core/basic_button.md) {% method %} [source](https://jsfiddle.net/fineui/19qqcej4/) diff --git a/uidoc/case/combo/formula_combo.md b/uidoc/case/combo/formula_combo.md deleted file mode 100644 index 3138d24ec..000000000 --- a/uidoc/case/combo/formula_combo.md +++ /dev/null @@ -1,38 +0,0 @@ -# bi.formula_combo_trigger - -## 基类[BI.Widget](/core/widget.md) - -{% method %} -[source]() - -{% common %} -```javascript - - - -``` - -{% endmethod %} - -## API -##### 基础属性 -| 参数 | 说明 | 类型 | 可选值 | 默认值 -| :------ |:------------- | :-----| :----|:---- -| height | 高度 | number | —| 30 -| items | 子组件 | array | — |[ ]| - - - -## 对外方法 -| 名称 | 说明 | 回调参数 -| :------ |:------------- | :----- -| setValue| 设置value值|—| -| getValue| 获取value值|—| - - - - - ---- - - diff --git a/uidoc/case/combo/icon_combo.md b/uidoc/case/combo/icon_combo.md index 85aa873ed..4a2229c8c 100644 --- a/uidoc/case/combo/icon_combo.md +++ b/uidoc/case/combo/icon_combo.md @@ -1,6 +1,6 @@ # bi.icon_combo -## 基类[BI.Widget](/core/widget.md) +## 切换trigger图标的combo 基类[BI.Widget](/core/widget.md) {% method %} [source](https://jsfiddle.net/fineui/z02vzvtb/) diff --git a/uidoc/case/combo/static_combo.md b/uidoc/case/combo/static_combo.md index 7410fe896..c6417aa64 100644 --- a/uidoc/case/combo/static_combo.md +++ b/uidoc/case/combo/static_combo.md @@ -1,6 +1,6 @@ # bi.static_combo -## 单选combo,基类[BI.Widget](/core/widget.md) +## 单选combo,trigger显示项不会改变 基类[BI.Widget](/core/widget.md) {% method %} [source](https://jsfiddle.net/fineui/kn64gfzn/) diff --git a/uidoc/case/combo/text_value_combo.md b/uidoc/case/combo/text_value_combo.md new file mode 100644 index 000000000..b605b378f --- /dev/null +++ b/uidoc/case/combo/text_value_combo.md @@ -0,0 +1,53 @@ +# text_value_combo + +## 单选combo, 基类[BI.Widget](/core/widget.md) + +{% method %} +[source](https://jsfiddle.net/fineui/72xwcdee/) + +{% common %} +```javascript + +BI.createWidget({ + type: "bi.text_value_combo", + text: "initial value", + element: "#wrapper", + width: 300, + items: [{ + text: "MVC-1", + value: 1 + }, { + text: "MVC-2", + value: 2 + }, { + text: "MVC-3", + value: 3 + }] +}) + + + +``` + +{% endmethod %} + +## API +##### 基础属性 +| 参数 | 说明 | 类型 | 可选值 | 默认值 +| :------ |:------------- | :-----| :----|:---- +| height | 高度 | number | — | 24 +| items | 子items | array | — | [ ] +| text | trigger初始文本内容 | string | — | " " | +| chooseType | 选择类型 | const |参考button_group | BI.ButtonGroup.CHOOSE_TYPE_SINGLE | + + + +## 对外方法 +| 名称 | 说明 | 回调参数 +| :------ |:------------- | :----- + + + + + +--- \ No newline at end of file diff --git a/uidoc/case/combo/text_value_downlist_combo.md b/uidoc/case/combo/text_value_downlist_combo.md index e4215dae2..733435fc5 100644 --- a/uidoc/case/combo/text_value_downlist_combo.md +++ b/uidoc/case/combo/text_value_downlist_combo.md @@ -1,6 +1,6 @@ # bi.text_value_down_list_combo -## 基类[BI.Widget](/core/widget.md) +## 有二级下拉菜单的combo 基类[BI.Widget](/core/widget.md) {% method %} [source](https://jsfiddle.net/fineui/xtxmfgx1/) diff --git a/uidoc/case/editor/shelter_editor.md b/uidoc/case/editor/shelter_editor.md index 4b3fca830..3340db320 100644 --- a/uidoc/case/editor/shelter_editor.md +++ b/uidoc/case/editor/shelter_editor.md @@ -1,6 +1,6 @@ # bi.shelter_editor -## 带标记的文本框,基类[BI.Widget](/core/widget.md) +## 带标记的文本框,需手动控制进入编辑状态 基类[BI.Widget](/core/widget.md) {% method %} [source](https://jsfiddle.net/fineui/9Lbx6kga/) diff --git a/uidoc/case/editor/sign_initial_editor.md b/uidoc/case/editor/sign_initial_editor.md index 469fa443b..c08af2c65 100644 --- a/uidoc/case/editor/sign_initial_editor.md +++ b/uidoc/case/editor/sign_initial_editor.md @@ -1,6 +1,6 @@ # bi.sign_initial_editor -## 基类[BI.Widget](/core/widget.md) +## 指定初始值 之后初始值会一直显示的editor 基类[BI.Widget](/core/widget.md) {% method %} [source](https://jsfiddle.net/fineui/9vjghevp/) diff --git a/uidoc/case/loader/lazy_loader.md b/uidoc/case/loader/lazy_loader.md index 1cfe99fdd..f206e98a9 100644 --- a/uidoc/case/loader/lazy_loader.md +++ b/uidoc/case/loader/lazy_loader.md @@ -1,6 +1,6 @@ # bi.lazy_loader -### 懒加载 +### 懒加载loader {% method %} [source](https://jsfiddle.net/fineui/n710yphc/) diff --git a/uidoc/case/loader/list_loader.md b/uidoc/case/loader/list_loader.md index 5d8b1da84..35334aadb 100644 --- a/uidoc/case/loader/list_loader.md +++ b/uidoc/case/loader/list_loader.md @@ -1,6 +1,6 @@ # bi.list_loader -### 恶心的加载控件, 为解决排序问题引入的控件 +### 为解决排序问题引入的控件 {% method %} [source](https://jsfiddle.net/fineui/8wa7rvcd/) diff --git a/uidoc/case/tree/display_tree.md b/uidoc/case/tree/display_tree.md index cb3a1ef51..4a2c83105 100644 --- a/uidoc/case/tree/display_tree.md +++ b/uidoc/case/tree/display_tree.md @@ -1,6 +1,6 @@ # bi.display_tree -### 异步树控件 +### 树展示控件 {% method %} [source](https://jsfiddle.net/fineui/cfL6fpa1/) diff --git a/uidoc/core/abstract/collection_view.md b/uidoc/core/abstract/collection_view.md index a389e3ef3..789ced1ed 100644 --- a/uidoc/core/abstract/collection_view.md +++ b/uidoc/core/abstract/collection_view.md @@ -1,6 +1,6 @@ # bi.collection_view -## CollectionView,基类[BI.Widget](/core/widget.md) +## CollectionView,指定行列可以删除看不见的元素 基类[BI.Widget](/core/widget.md) {% method %} [source](https://jsfiddle.net/fineui/cmq0b3v0/) diff --git a/uidoc/core/abstract/grid_view.md b/uidoc/core/abstract/grid_view.md index 833ef7a64..4824ce605 100644 --- a/uidoc/core/abstract/grid_view.md +++ b/uidoc/core/abstract/grid_view.md @@ -1,6 +1,6 @@ # bi.grid_view -## GridView,基类[BI.Widget](/core/widget.md) +## 可以合并单元格,指定行列可以删除看不见的元素,基类[BI.Widget](/core/widget.md) {% method %} [source](https://jsfiddle.net/fineui/fkntzLq5/) diff --git a/uidoc/core/abstract/virtual_group.md b/uidoc/core/abstract/virtual_group.md index 9128c3733..5cbcf431c 100644 --- a/uidoc/core/abstract/virtual_group.md +++ b/uidoc/core/abstract/virtual_group.md @@ -1,9 +1,9 @@ # bi.virtual_group -## 一组具有相同属性的元素集合,基类[BI.Widget](/core/widget.md) +## 优化过的buttonGroup,删除看不见的元素 基类[BI.Widget](/core/widget.md) {% method %} -[source](https://jsfiddle.net/fineui/gesh31xg/) +[source](https://jsfiddle.net/fineui/9pd0dct0/) {% common %} ```javascript diff --git a/uidoc/core/abstract/virtual_list.md b/uidoc/core/abstract/virtual_list.md index 205483234..d69ad86ae 100644 --- a/uidoc/core/abstract/virtual_list.md +++ b/uidoc/core/abstract/virtual_list.md @@ -1,6 +1,6 @@ # bi.virtual_list -## VirtualList,基类[BI.Widget](/core/widget.md) +## 看不见的元素全部删除的list,基类[BI.Widget](/core/widget.md) {% method %} [source](https://jsfiddle.net/fineui/L995LrL9/) diff --git a/uidoc/core/combination/bi.expander.md b/uidoc/core/combination/bi.expander.md index 5db37e917..b5d6ab382 100644 --- a/uidoc/core/combination/bi.expander.md +++ b/uidoc/core/combination/bi.expander.md @@ -2,6 +2,41 @@ ## 某个可以展开的节点,基类[BI.Widget](/core/widget.md) +{% method %} +[source](https://jsfiddle.net/fineui/2xavqk4k/) + +{% common %} +```javascript + +BI.createWidget({ + type: "bi.expander", + element: "#wrapper", + el: { + type: "bi.icon_text_node", + cls: "pull-right-ha-font", + height: 25, + text: "Expander" + }, + popup: { + items: [{ + type: "bi.single_select_item", + height: 25, + text: "项目1", + value: 1 + }, { + type: "bi.single_select_item", + height: 25, + text: "项目2", + value: 2 + }] + } +}); + + + +``` + +{% endmethod %} ## API ##### 基础属性 diff --git a/uidoc/core/combination/group_combo.md b/uidoc/core/combination/group_combo.md index 41c39d5eb..b0bb1d7bb 100644 --- a/uidoc/core/combination/group_combo.md +++ b/uidoc/core/combination/group_combo.md @@ -1,7 +1,47 @@ # bi.combo_group -## 基类[BI.Widget](/core/widget.md) +## 有子级的combo 基类[BI.Widget](/core/widget.md) +{% method %} +[source](https://jsfiddle.net/fineui/x32ue8xv/) + +{% common %} +```javascript + +BI.createWidget({ + element: "#wrapper", + type: "bi.combo_group", + el: { + type: "bi.icon_text_icon_item", + text: "2010年", + value: 2010, + height: 25, + iconCls: "close-ha-font" + }, + children: [{ + type: "bi.single_select_item", + height: 25, + text: "一月", + value: 11 + }, { + type: "bi.icon_text_icon_item", + height: 25, + text: "二月", + value: 12, + children: [{ + type: "bi.single_select_item", + text: "一号", + value: 101, + height: 25 + }] + }] +}); + + + +``` + +{% endmethod %} ## API ##### 基础属性 diff --git a/uidoc/core/combination/loader.md b/uidoc/core/combination/loader.md index 41b6a444e..87c250c32 100644 --- a/uidoc/core/combination/loader.md +++ b/uidoc/core/combination/loader.md @@ -2,6 +2,28 @@ ## 加载控件,[BI.Widget](/core/widget.md) +{% method %} +[source](https://jsfiddle.net/fineui/qgLtctnx/) + +{% common %} +```javascript + +BI.createWidget({ + element: "#wrapper", + type: "bi.loader", + itemsCreator: function(options, populate) { + populate(); + }, + hasNext: function(option) { + return option.count < 10; + } +}); + + + +``` + +{% endmethod %} ## API ##### 基础属性 diff --git a/uidoc/core/layout/inline.md b/uidoc/core/layout/inline.md deleted file mode 100644 index f3d0ae53e..000000000 --- a/uidoc/core/layout/inline.md +++ /dev/null @@ -1,2 +0,0 @@ -# inline - diff --git a/uidoc/detailed/slider.md b/uidoc/detailed/slider.md index 190401700..77435399e 100644 --- a/uidoc/detailed/slider.md +++ b/uidoc/detailed/slider.md @@ -8,8 +8,9 @@ {% common %} ```javascript BI.createWidget({ - type: "bi.multi_select_combo", - items: [], + type: "bi.slider", + min: 16, + max: 50, }); ```