From 77e9e46b27fe249b4d09bdc4922a9d902905f5c4 Mon Sep 17 00:00:00 2001 From: woodyjang Date: Wed, 6 Sep 2017 11:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uidoc/case/combo/icon_combo.md | 17 ++++- uidoc/case/combo/static_combo.md | 17 ++++- uidoc/case/combo/text_value_downlist_combo.md | 27 +++++++- uidoc/case/layer/layer_panel.md | 69 ++++++++++++++++++- uidoc/case/layer/multi_popup_layer.md | 34 ++++++++- uidoc/case/layer/pane_list.md | 8 ++- uidoc/case/layer/panel.md | 16 ++++- uidoc/core/widget.md | 2 +- 8 files changed, 182 insertions(+), 8 deletions(-) diff --git a/uidoc/case/combo/icon_combo.md b/uidoc/case/combo/icon_combo.md index 0950b16e4..85aa873ed 100644 --- a/uidoc/case/combo/icon_combo.md +++ b/uidoc/case/combo/icon_combo.md @@ -3,11 +3,26 @@ ## 基类[BI.Widget](/core/widget.md) {% method %} -[source]() +[source](https://jsfiddle.net/fineui/z02vzvtb/) {% common %} ```javascript +BI.createWidget({ + type: "bi.icon_combo", + element: "#wrapper", + iconClass: "rename-font", + items: [{ + value: "第一项", + iconClass: "delete-font" + }, { + value: "第二项", + iconClass: "rename-font" + }, { + value: "第三项", + iconClass: "move-font" + }] +}); diff --git a/uidoc/case/combo/static_combo.md b/uidoc/case/combo/static_combo.md index 8d40ee827..7410fe896 100644 --- a/uidoc/case/combo/static_combo.md +++ b/uidoc/case/combo/static_combo.md @@ -3,11 +3,26 @@ ## 单选combo,基类[BI.Widget](/core/widget.md) {% method %} -[source]() +[source](https://jsfiddle.net/fineui/kn64gfzn/) {% common %} ```javascript +BI.createWidget({ + type: "bi.static_combo", + element: "#wrapper", + text: "Value 不变", + items: [{ + text: "1", + value: 1 + }, { + text: "2", + value: 2 + }, { + text: "3", + value: 3 + }] + }); diff --git a/uidoc/case/combo/text_value_downlist_combo.md b/uidoc/case/combo/text_value_downlist_combo.md index c575e783e..e4215dae2 100644 --- a/uidoc/case/combo/text_value_downlist_combo.md +++ b/uidoc/case/combo/text_value_downlist_combo.md @@ -3,11 +3,36 @@ ## 基类[BI.Widget](/core/widget.md) {% method %} -[source]() +[source](https://jsfiddle.net/fineui/xtxmfgx1/) {% common %} ```javascript +BI.createWidget({ + type: "bi.text_value_down_list_combo", + element: "#wrapper", + text: "text", + items: [ + [{ + el: { + text: "1", + value: 1 + }, + children: [{ + text: "11", + value: 11 + }] + }], + [{ + text: "2", + value: 2 + }, { + text: "3", + value: 3 + }] + ] +}); + ``` diff --git a/uidoc/case/layer/layer_panel.md b/uidoc/case/layer/layer_panel.md index 33257ef7d..8e34ca2f2 100644 --- a/uidoc/case/layer/layer_panel.md +++ b/uidoc/case/layer/layer_panel.md @@ -1,2 +1,69 @@ -# layer_panel +# bi.popup_panel + +## 可以理解为MultiPopupView和Panel两个面板的结合体,基类[BI.MultiPopupView](case/layer/multi_popup_layer.md) + +{% method %} +[source](https://jsfiddle.net/fineui/zhnqvera/) + +{% common %} +```javascript + +BI.createWidget({ + element: "#wrapper", + type: "bi.popup_panel", + title: "测试", + width: 300 +}); + +``` + +{% endmethod %} + +## API +##### 基础属性 +| 参数 | 说明 | 类型 | 可选值 | 默认值 +| :------ |:------------- | :-----| :----|:---- +| title | 标题 | string | — | " " + + + + + + + +## 对外方法 +| 名称 | 说明 | 回调参数 +| :------ |:------------- | :----- +| prependItems | 内部前插入 | items | +| addItems | 内部后插入 | items | +| removeItemAt | 移除指定索引处的item | indexs | +| populate | 刷新列表 | items | +| setNotSelectedValue| 设置未被选中的值 | value,可以是单个值也可以是个数组| +| setValue | 设置value值 | value,可以是单个值也可以是个数组 | +| getNotSelectedValue | 获取没有被选中的值 | —| +| getValue | 获取被选中的值 |—| +| getAllButtons | 获取所有button |—| +| getAllLeaves | 获取所有的叶子节点 | —| +| getSelectedButtons | 获取所有被选中的元素 | —| +| getNotSelectedButtons | 获取所有未被选中的元素 | —| +| getIndexByValue | 根据value值获取value在数组中的索引 | value| +| getNodeById | 根据id获取节点 | id | +| getNodeByValue | 根据value值获取节点 | value | +| empty| 清空组件|—| +| hasPrev| 是否有上一页|—| +| hasNext | 是否有下一页 | — + + +## 事件 +| 事件 | 说明 | +| :------ |:------------- | +|BI.PopupPanel.EVENT_CHANGE | panel的value发生改变触发 | +| BI.PopupPanel.EVENT_CLOSE | panel的关闭事件 +| BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON | 点击工具栏事件 + + + + +--- + diff --git a/uidoc/case/layer/multi_popup_layer.md b/uidoc/case/layer/multi_popup_layer.md index 9c70bc06b..dfe6b7f26 100644 --- a/uidoc/case/layer/multi_popup_layer.md +++ b/uidoc/case/layer/multi_popup_layer.md @@ -1,2 +1,34 @@ -# multi_popup_layer +# bi.multi_popup_view + +## 下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w,基类[BI.MultiPopupView](case/layer/multi_popup_layer.md) + +{% method %} +[source](https://jsfiddle.net/fineui/8of9a7cy/) + +{% common %} +```javascript + +BI.createWidget({ + element: "#wrapper", + type: "bi.multi_popup_view", + width: 300 +}); + + +``` + +{% endmethod %} + +## API +##### 基础属性 +| 参数 | 说明 | 类型 | 可选值 | 默认值 +| :------ |:------------- | :-----| :----|:---- +| buttons | 按钮组 |array | — | BI.i18nText("BI-Basic_Sure") + + + + + +--- + diff --git a/uidoc/case/layer/pane_list.md b/uidoc/case/layer/pane_list.md index efb490f31..cbbdc06d7 100644 --- a/uidoc/case/layer/pane_list.md +++ b/uidoc/case/layer/pane_list.md @@ -3,11 +3,17 @@ ## list面板,基类[BI.Widget](/core/widget.md) {% method %} -[source]() +[source](https://jsfiddle.net/fineui/7Lv8q9p9/) {% common %} ```javascript +BI.createWidget({ + type: 'bi.list_pane', + element: "#wrapper", + cls: "bi-border", + items: [] +}); ``` diff --git a/uidoc/case/layer/panel.md b/uidoc/case/layer/panel.md index a4237b300..f145b7617 100644 --- a/uidoc/case/layer/panel.md +++ b/uidoc/case/layer/panel.md @@ -3,11 +3,25 @@ ## 带有标题栏的panel,基类[BI.Widget](/core/widget.md) {% method %} -[source]() +[source](https://jsfiddle.net/fineui/3m1q3857/) {% common %} ```javascript +BI.createWidget({ + element: "#wrapper", + type: "bi.panel", + title: "标题", + titleButtons: [{ + type: "bi.button", + text: "+" + }], + el: this.button_group, + logic: { + dynamic: true + } +}); + ``` diff --git a/uidoc/core/widget.md b/uidoc/core/widget.md index 18fae8ad1..b956f85c9 100644 --- a/uidoc/core/widget.md +++ b/uidoc/core/widget.md @@ -42,7 +42,7 @@ | setEnable | 设置组件是否可用 | enable | | setVisible | 设置组件是否可见 | visible | | setValid | 设置组件是否有效 | valid| -| doBehavior | | —| +| doBehavior | 自定义下拉列表中item项的行为,如高亮,标红等 | —| | getWidth | 获取组件宽度 | —| | getHeight| 获取组件高度| —| | isValid | 判断是否有效 | —|