Browse Source

文档修改

es6
woodyjang 7 years ago
parent
commit
77e9e46b27
  1. 17
      uidoc/case/combo/icon_combo.md
  2. 17
      uidoc/case/combo/static_combo.md
  3. 27
      uidoc/case/combo/text_value_downlist_combo.md
  4. 69
      uidoc/case/layer/layer_panel.md
  5. 34
      uidoc/case/layer/multi_popup_layer.md
  6. 8
      uidoc/case/layer/pane_list.md
  7. 16
      uidoc/case/layer/panel.md
  8. 2
      uidoc/core/widget.md

17
uidoc/case/combo/icon_combo.md

@ -3,11 +3,26 @@
## 基类[BI.Widget](/core/widget.md) ## 基类[BI.Widget](/core/widget.md)
{% method %} {% method %}
[source]() [source](https://jsfiddle.net/fineui/z02vzvtb/)
{% common %} {% common %}
```javascript ```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"
}]
});

17
uidoc/case/combo/static_combo.md

@ -3,11 +3,26 @@
## 单选combo,基类[BI.Widget](/core/widget.md) ## 单选combo,基类[BI.Widget](/core/widget.md)
{% method %} {% method %}
[source]() [source](https://jsfiddle.net/fineui/kn64gfzn/)
{% common %} {% common %}
```javascript ```javascript
BI.createWidget({
type: "bi.static_combo",
element: "#wrapper",
text: "Value 不变",
items: [{
text: "1",
value: 1
}, {
text: "2",
value: 2
}, {
text: "3",
value: 3
}]
});

27
uidoc/case/combo/text_value_downlist_combo.md

@ -3,11 +3,36 @@
## 基类[BI.Widget](/core/widget.md) ## 基类[BI.Widget](/core/widget.md)
{% method %} {% method %}
[source]() [source](https://jsfiddle.net/fineui/xtxmfgx1/)
{% common %} {% common %}
```javascript ```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
}]
]
});
``` ```

69
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 | 点击工具栏事件
---

34
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")
---

8
uidoc/case/layer/pane_list.md

@ -3,11 +3,17 @@
## list面板,基类[BI.Widget](/core/widget.md) ## list面板,基类[BI.Widget](/core/widget.md)
{% method %} {% method %}
[source]() [source](https://jsfiddle.net/fineui/7Lv8q9p9/)
{% common %} {% common %}
```javascript ```javascript
BI.createWidget({
type: 'bi.list_pane',
element: "#wrapper",
cls: "bi-border",
items: []
});
``` ```

16
uidoc/case/layer/panel.md

@ -3,11 +3,25 @@
## 带有标题栏的panel,基类[BI.Widget](/core/widget.md) ## 带有标题栏的panel,基类[BI.Widget](/core/widget.md)
{% method %} {% method %}
[source]() [source](https://jsfiddle.net/fineui/3m1q3857/)
{% common %} {% common %}
```javascript ```javascript
BI.createWidget({
element: "#wrapper",
type: "bi.panel",
title: "标题",
titleButtons: [{
type: "bi.button",
text: "+"
}],
el: this.button_group,
logic: {
dynamic: true
}
});
``` ```

2
uidoc/core/widget.md

@ -42,7 +42,7 @@
| setEnable | 设置组件是否可用 | enable | | setEnable | 设置组件是否可用 | enable |
| setVisible | 设置组件是否可见 | visible | | setVisible | 设置组件是否可见 | visible |
| setValid | 设置组件是否有效 | valid| | setValid | 设置组件是否有效 | valid|
| doBehavior | | —| | doBehavior | 自定义下拉列表中item项的行为,如高亮,标红等 | —|
| getWidth | 获取组件宽度 | —| | getWidth | 获取组件宽度 | —|
| getHeight| 获取组件高度| —| | getHeight| 获取组件高度| —|
| isValid | 判断是否有效 | —| | isValid | 判断是否有效 | —|

Loading…
Cancel
Save