iapyang 7 years ago
parent
commit
acfe30037e
  1. 3
      public/js/index.js
  2. 21
      uidoc/base/editor/editor.md
  3. 7
      uidoc/base/editor/multifile_editor.md
  4. 6
      uidoc/base/pager.md
  5. 16
      uidoc/base/svg.md
  6. 9
      uidoc/base/table/table_view.md
  7. 11
      uidoc/core/abstract/button_group.md
  8. 7
      uidoc/core/abstract/button_tree.md
  9. 4
      uidoc/core/abstract/collection_view.md
  10. 45
      uidoc/core/abstract/custom_tree.md
  11. 5
      uidoc/core/abstract/grid_view.md
  12. 10
      uidoc/core/abstract/virtual_list.md
  13. 13
      uidoc/core/combination/bi.combo.md
  14. 12
      uidoc/core/combination/bi.expander.md
  15. 51
      uidoc/core/combination/searcher.md
  16. 11
      uidoc/detailed/combo/single_tree_combo.md
  17. 8
      uidoc/detailed/date/custom_date_time.md
  18. 10
      uidoc/detailed/date/year_month_combo.md
  19. 11
      uidoc/detailed/date/year_quarter_combo.md
  20. 1
      uidoc/detailed/down_list_combo.md
  21. 1
      uidoc/detailed/month_combo.md
  22. 1
      uidoc/detailed/multi_select_combo.md
  23. 1
      uidoc/detailed/numeric_interval.md
  24. 1
      uidoc/detailed/quarter_combo.md
  25. 31
      uidoc/detailed/table/bi.preview_table.md
  26. 31
      uidoc/detailed/table/bi.responsive_table.md
  27. 9
      uidoc/detailed/text_input/bi.clear_editor.md
  28. 25
      uidoc/detailed/text_input/bi.search_editor.md
  29. 51
      uidoc/detailed/text_input/bi.text_editor.md
  30. 27
      uidoc/detailed/text_input/finetuning_number_editor.md
  31. 7
      uidoc/detailed/tree/bi.multi_tree_combo.md
  32. 1
      uidoc/detailed/year_combo.md

3
public/js/index.js

@ -26,5 +26,6 @@ BI.i18n = {
"BI-Quarter_4": "第4季度",
"BI-Basic_Value": "值",
"BI-Load_More": "加载更多",
"BI-Select_All": "全选"
"BI-Select_All": "全选",
"BI-Basic_Auto": "自动"
};

21
uidoc/base/editor/editor.md

@ -63,7 +63,26 @@ BI.createWidget({
| isEditing | 文本框是否处于编辑状态|—|
| isValid | 文本框值是否有效|—|
## 事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.Editor.EVENT_CHANGE | editor的value发生改变触发 |
|BI.Editor.EVENT_FOCUS | focus事件 |
|BI.Editor.EVENT_BLUR | blur事件 |
|BI.Editor.EVENT_CLICK | 点击编辑框触发(不在编辑状态时) |
|BI.Editor.EVENT_KEY_DOWN | keyDown时触发 |
|BI.Editor.EVENT_SPACE | 按下空格触发 |
|BI.Editor.EVENT_BACKSPACE | 按下Backspace触发 |
|BI.Editor.EVENT_START | 开始输入触发 |
|BI.Editor.EVENT_PAUSE | 暂停输入触发(输入空白字符) |
|BI.Editor.EVENT_STOP | 停止输入触发 |
|BI.Editor.EVENT_CONFIRM | 确定输入触发(blur时且输入值有效) |
|BI.Editor.EVENT_VALID | 输入值有效的状态事件 |
|BI.Editor.EVENT_ERROR | 输入值无效的状态事件 |
|BI.Editor.EVENT_ENTER | 回车事件 |
|BI.Editor.EVENT_RESTRICT | 回车但是值不合法 |
|BI.Editor.EVENT_REMOVE | 输入为空时按下backspace |
|BI.Editor.EVENT_EMPTY | 输入框为空时触发 |
---

7
uidoc/base/editor/multifile_editor.md

@ -38,7 +38,12 @@ BI.createWidget({
| upload | 文件上传| —|
| reset | 重置| —|
## 事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.MultifileEditor.EVENT_UPLOADSTART | 开始上传时触发 |
|BI.MultifileEditor.EVENT_PROGRESS | 上传过程中触发 |
|BI.MultifileEditor.EVENT_UPLOADED | 上传结束后触发 |
---

6
uidoc/base/pager.md

@ -58,8 +58,10 @@ BI.createWidget({
| attr | 设置属性 | key,value |
| populate | | —|
## 事件
| 名称 | 说明 |
| :------ |:------------- |
| BI.Pager.EVENT_AFTER_POPULATE | pager刷新完成事件 |
---

16
uidoc/base/svg.md

@ -13,26 +13,10 @@ var svg = BI.createWidget({
width: 500,
height: 600
});
var circle = svg.circle(100, 100, 10);
circle.animate({fill: "#223fa3", stroke: "#000", "stroke-width": 80, "stroke-opacity": 0.5}, 2000);
var el = svg.rect(10, 200, 300, 200);
el.transform("t100,100r45t-100,0");
svg.path("M10,10L50,50M50,10L10,50")
.attr({stroke: "red"});
BI.createWidget({
type: "bi.absolute",
element: this,
items: [{
el: svg,
left: 100,
top: 50
}]
})
```

9
uidoc/base/table/table_view.md

@ -62,3 +62,12 @@ BI.createWidget({
| getRightHorizontalScroll | 获取右往左横向滚动距离 | getRightHorizontalScroll() |
| getColumns | 获取列项 | getColumns() |
| populate | 增加行 | populate(rows) |
## 事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.Table.EVENT_TABLE_AFTER_INIT | table初始化完成后触发 |
|BI.Table.EVENT_TABLE_RESIZE | table大小调整时触发(窗口变化等) |
|BI.Table.EVENT_TABLE_SCROLL | 滚动事件 |
---

11
uidoc/core/abstract/button_group.md

@ -9,18 +9,11 @@
```javascript
BI.createWidget({
element: "#wrapper",
element: "#wrapper",
type: "bi.button_group",
ref: function (_ref) {
ref = _ref;
},
chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
layouts: [{
type: "bi.vertical",
items: [{
type: "bi.vtape",
height: 150,
}]
type: "bi.vertical"
}],
items: [{
el: {

7
uidoc/core/abstract/button_tree.md

@ -14,8 +14,6 @@ BI.createWidget({
chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,
layouts: [{
type: "bi.vertical"
}, {
type: "bi.center_adapt",
}],
items: [{
type: "bi.label",
@ -23,11 +21,6 @@ BI.createWidget({
value: "label1",
height:50,
vgap:10
}, {
type: "bi.button",
text: "1",
value: "按钮1",
height:30
}]
})
```

4
uidoc/core/abstract/collection_view.md

@ -61,6 +61,10 @@ BI.createWidget({
| populate | 刷新列表 | items |
## 事件
| 事件 | 说明 | 回调参数 |
| :------ |:------------- |:------------------------|
|BI.GridView.EVENT_SCROLL| 滚动时触发的事件 | {scrollLeft: scrollLeft, scrollTop: scrollTop} |
---

45
uidoc/core/abstract/custom_tree.md

@ -8,28 +8,6 @@
{% common %}
```javascript
var TREEITEMS=[{
id: -1,
pId: -2,
value: "根目录",
open: true,
type: "bi.plus_group_node",
height: 25
},
{
id: 1,
pId: -1,
value: "第一级目录1",
type: "bi.plus_group_node",
height: 25
},
{
id: 11,
pId: 1,
value: "第二级文件1",
type: "bi.single_select_item",
height: 25
}];
BI.createWidget({
type: "bi.custom_tree",
el: {
@ -40,7 +18,28 @@ BI.createWidget({
hgap: 30
}]
},
items: BI.deepClone(TREEITEMS)
items: [{
id: -1,
pId: -2,
value: "根目录",
open: true,
type: "bi.plus_group_node",
height: 25
},
{
id: 1,
pId: -1,
value: "第一级目录1",
type: "bi.plus_group_node",
height: 25
},
{
id: 11,
pId: 1,
value: "第二级文件1",
type: "bi.single_select_item",
height: 25
}]
});

5
uidoc/core/abstract/grid_view.md

@ -67,7 +67,10 @@ BI.createWidget({
| restore | 还原列表设置 | — |
| populate | 刷新列表 | items |
## 事件
| 事件 | 说明 | 回调参数
| :------ |:------------- |:----------|
|BI.CollectionView.EVENT_SCROLL| 滚动时触发的事件 | {scrollLeft: scrollLeft, scrollTop: scrollTop} |
---

10
uidoc/core/abstract/virtual_list.md

@ -8,18 +8,10 @@
{% common %}
```javascript
var ITEMS = BI.map("柳州市城贸金属材料有限责任公司 柳州市建福房屋租赁有限公司 柳州市迅昌数码办公设备有限责任公司 柳州市河海贸易有限责任公司 柳州市花篮制衣厂 柳州市兴溪物资有限公司 柳州市针织总厂 柳州市衡管物资有限公司 柳州市琪成机电设备有限公司 柳州市松林工程机械修理厂".match(/[^\s]+/g), function (i, v) {
return {
text: v,
value: v,
title: v
}
});
BI.createWidget({
type: "bi.virtual_list",
element:"body",
items: BI.map(ITEMS, function (i, item) {
items: BI.map([{value: "xxxx"}], function (i, item) {
return BI.extend({}, item, {
type: "bi.label",
height: 30,

13
uidoc/core/combination/bi.combo.md

@ -69,7 +69,18 @@ BI.createWidget({
| toggle |||
|destroy |||
## 事件
| 名称 | 说明 |
| :------ |:------------- |
|BI.Combo.EVENT_TRIGGER_CHANGE | trigger发生改变触发 |
|BI.Combo.EVENT_CHANGE | 弹出层点击触发 |
|BI.Combo.EVENT_EXPAND | 下拉框展开触发 |
|BI.Combo.EVENT_COLLAPSE | 下拉框收起触发
|BI.Combo.EVENT_AFTER_INIT | 下拉框初始化后触发 |
|BI.Combo.EVENT_BEFORE_POPUPVIEW | 下拉列表弹出前触发 |
|BI.Combo.EVENT_AFTER_POPUPVIEW | 下拉列表弹出后触发 |
|BI.Combo.EVENT_BEFORE_HIDEVIEW | 下拉列表收起前触发 |
|BI.Combo.EVENT_AFTER_HIDEVIEW | 下拉列表收起后触发 |
---

12
uidoc/core/combination/bi.expander.md

@ -34,6 +34,18 @@
| isExpanded | 节点是否展开 | |
| destroy | 销毁组件| — |
## 事件
| 名称 | 说明 |
| :------ |:------------- |
|BI.Expander.EVENT_TRIGGER_CHANGE | trigger发生改变触发 |
|BI.Expander.EVENT_CHANGE | 弹出层点击触发 |
|BI.Expander.EVENT_EXPAND | Expander展开触发 |
|BI.Expander.EVENT_COLLAPSE | Expander收起触发
|BI.Expander.EVENT_AFTER_INIT | Expander初始化后触发 |
|BI.Expander.EVENT_BEFORE_POPUPVIEW | 下拉列表弹出前触发 |
|BI.Expander.EVENT_AFTER_POPUPVIEW | 下拉列表弹出后触发 |
|BI.Expander.EVENT_BEFORE_HIDEVIEW | 下拉列表收起前触发 |
|BI.Expander.EVENT_AFTER_HIDEVIEW | 下拉列表收起后触发 |
---

51
uidoc/core/combination/searcher.md

@ -8,42 +8,25 @@
{% common %}
```javascript
var items = [{
type: "bi.label",
value: "张三"
}, {
type: "bi.label",
value: "李四"
}];
var popup = BI.createWidget({
type: "bi.button_group",
cls: "bi-border",
items: items,
layouts: [{
type: "bi.vertical"
}]
});
BI.createWidget({
type: "bi.searcher",
element:"#wrapper",
listeners: [{
eventName: BI.Searcher.EVENT_STOP,
action: function () {
popup.populate(items)
}
}, {
eventName: BI.Searcher.EVENT_PAUSE,
action: function () {
popup.populate(items)
}
}],
adapter: {
getItems: function () {
return items
return [{
type: "bi.label",
value: "张三"
}]
}
},
popup: popup,
popup: {
type: "bi.button_group",
cls: "bi-border",
items: items,
layouts: [{
type: "bi.vertical"
}],
},
masker: false
})
@ -82,7 +65,15 @@ BI.createWidget({
| empty| 清空组件|—|
| destroy| 销毁组件|—|
## 事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.Searcher.EVENT_CHANGE | 搜索结果面板发生改变触发 |
|BI.Searcher.EVENT_START | 开始搜索触发 |
|BI.Searcher.EVENT_STOP | 停止搜索触发(搜索框为空) |
|BI.Searcher.EVENT_PAUSE | 搜索暂停触发(搜索文本以空白字符结尾) |
|BI.Searcher.EVENT_SEARCHING | 正在搜索时触发 |
|BI.Searcher.EVENT_AFTER_INIT | 搜索结果面板初始化完成后触发 |
---

11
uidoc/detailed/combo/single_tree_combo.md

@ -8,7 +8,7 @@
{% common %}
```javascript
var tree = BI.createWidget({
type: "bi.simple_tree_combo",
type: "bi.single_tree_combo",
element: 'body',
items: [],
text: "默认值",
@ -39,3 +39,12 @@ var tree = BI.createWidget({
| setValue | 设置值 | setValue |
| getValue | 获取值 | getValue |
## 事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW| 下拉框弹出前触发 |
其他事件详见[Input](../../base/editor/editor.md)
---

8
uidoc/detailed/date/custom_date_time.md

@ -20,3 +20,11 @@ BI.createWidget({
| 参数 | 说明 | 类型 | 可选值 | 默认值
| :------ |:------------- | :-----| :----|:----|
--- ---
##事件
| 事件 | 说明 |
| :------ |:------------- |
| BI.CustomDateTimeCombo.EVENT_CANCEL| 点击取消触发 |
| BI.CustomDateTimeCombo.EVENT_CONFIRM| 点击确认触发 |
---

10
uidoc/detailed/date/year_month_combo.md

@ -21,4 +21,12 @@ BI.createWidget({
| :------ |:------------- | :-----| :----|:----|
| yearBehaviors |自定义年份选择的行为(详见[button_group](../../core/abstract/button_group.md)) | object| | |
| monthBehaviors |自定义年份选择的行为(详见[button_group](../../core/abstract/button_group.md)) | object| | |
--- ---
--- ---
##事件
| 事件 | 说明 |
| :------ |:------------- |
| BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW | 弹出框弹出前触发 |
| BI.YearMonthCombo.EVENT_CONFIRM| 点击确认触发 |
---

11
uidoc/detailed/date/year_quarter_combo.md

@ -21,4 +21,13 @@ BI.createWidget({
| :------ |:------------- | :-----| :----|:----|
| yearBehaviors |自定义年份选择的行为(详见[button_group](../../core/abstract/button_group.md)) | object| | |
| monthBehaviors |自定义年份选择的行为(详见[button_group](../../core/abstract/button_group.md)) | object| | |
--- ---
--- ---
##事件
| 事件 | 说明 |
| :------ |:------------- |
| BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW | 弹出框弹出前触发 |
| BI.YearQuarterCombo.EVENT_CONFIRM| 点击确认触发 |
---

1
uidoc/detailed/down_list_combo.md

@ -69,6 +69,7 @@ BI.createWidget({
##事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.DownListCombo.EVENT_CHANGE| 点击一级节点触发 |
|BI.DownListCombo.EVENT_SON_VALUE_CHANGE| 点击二级节点触发 |
|BI.DownListCombo.EVENT_BEFORE_POPUPVIEW| 下拉列表弹出前触发 |

1
uidoc/detailed/month_combo.md

@ -26,6 +26,7 @@ BI.createWidget({
##事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.MonthCombo.EVENT_CONFIRM| 选中日期或者退出编辑状态触发 |
|BI.MonthCombo.EVENT_BEFORE_POPUPVIEW| 选中日期或者退出编辑状态触发 |

1
uidoc/detailed/multi_select_combo.md

@ -32,4 +32,5 @@ BI.createWidget({
| ---------------------------- | ---------------- | ------------------------------------ | |
| 事件 | 说明 |
| :------ |:------------- |
|BI.MultiSelectCombo.EVENT_CONFIRM| 点击确定触发 |

1
uidoc/detailed/numeric_interval.md

@ -37,5 +37,6 @@ BI.createWidget({
##事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.NumericalInterval.EVENT_VALID| 区间合法的状态事件 |
|BI.NumericalInterval.EVENT_ERROR| 区间不合法的状态事件 |

1
uidoc/detailed/quarter_combo.md

@ -26,5 +26,6 @@ BI.createWidget({
##事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.QuarterCombo.EVENT_CONFIRM| 选中日期或者退出编辑状态触发 |
|BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW| 选中日期或者退出编辑状态触发 |

31
uidoc/detailed/table/bi.preview_table.md

@ -7,28 +7,25 @@
{% common %}
```javascript
var items = [[{
text: "第一行第一列"
}, {
text: "第一行第二列"
}, {
text: "第一行第三列"
}]];
var header = [[{
text: "表头1"
}, {
text: "表头2"
}, {
text: "表头3"
}]];
BI.createWidget({
type: "bi.preview_table",
header: header,
header: [[{
text: "表头1"
}, {
text: "表头2"
}, {
text: "表头3"
}]],
element: 'body',
columnSize: [100, "", 50],
items: items
items: [[{
text: "第一行第一列"
}, {
text: "第一行第二列"
}, {
text: "第一行第三列"
}]]
});
```

31
uidoc/detailed/table/bi.responsive_table.md

@ -7,21 +7,6 @@
{% common %}
```javascript
var items = [[{
text: "第一行第一列"
}, {
text: "第一行第二列"
}, {
text: "第一行第三列"
}]];
var header = [[{
text: "表头1"
}, {
text: "表头2"
}, {
text: "表头3"
}]];
BI.createWidget({
type: "bi.responsive_table",
@ -29,8 +14,20 @@ BI.createWidget({
isNeedFreeze: true,
mergeCols: [0, 1],
columnSize: ["", "", ""],
items: items,
header: header,
items: [[{
text: "第一行第一列"
}, {
text: "第一行第二列"
}, {
text: "第一行第三列"
}]],
header: [[{
text: "表头1"
}, {
text: "表头2"
}, {
text: "表头3"
}]],
element: 'body'
});
```

9
uidoc/detailed/text_input/bi.clear_editor.md

@ -40,3 +40,12 @@ BI.createWidget({
--- ---
## 事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.ClearEditor.EVENT_CLEAR| 点击清空按钮触发 |
---
其他事件详见[Input](../../base/editor/editor.md)

25
uidoc/detailed/text_input/bi.search_editor.md

@ -17,24 +17,6 @@ BI.createWidget({
{% endmethod %}
## bi.small_search_editor
### 小一号的搜索框
##### height默认为24
{% method %}
[source](https://jsfiddle.net/fineui/wwzza22k/)
{% common %}
```javascript
BI.createWidget({
type: 'bi.search_editor',
element: '#wrapper',
width: 300,
watermark:"搜索",
});
```
{% endmethod %}
##API
| 参数 | 说明 | 类型 | 可选值 | 默认值
@ -57,4 +39,11 @@ BI.createWidget({
--- ---
## 事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.SearchEditor.EVENT_CLEAR| 点击清空按钮触发 |
---
其他事件详见[Editor](../../base/editor/editor.md)

51
uidoc/detailed/text_input/bi.text_editor.md

@ -19,52 +19,6 @@ BI.createWidget({
{% endmethod %}
## 不可为空输入框
{% method %}
[source](https://jsfiddle.net/fineui/d7td9tfr/)
{% common %}
```javascript
BI.createWidget({
type: "bi.text_editor",
element: "#wrapper",
width: 200,
height: 30,
watermark:"这个不予许空",
value: "这是一个不可为空的输入框",
allowBlank: false,
errorText: "不允许为空"
});
```
{% endmethod %}
## 可为空输入框
{% method %}
[source](https://jsfiddle.net/fineui/kjmyg9ps/)
{% common %}
```javascript
BI.createWidget({
type: "bi.text_editor",
element: "#wrapper",
width: 200,
height: 30,
allowBlank: true,
errorText: "不能输入只输入a!",
validationChecker: function (v) {
if (v == "a") {
return false;
}
return true;
},
});
```
{% endmethod %}
##API
| 参数 | 说明 | 类型 | 可选值 | 默认值
@ -87,3 +41,8 @@ BI.createWidget({
--- ---
## 事件
| 事件 | 说明 |
| :------ |:------------- |
---
其他事件详见[Editor](../../base/editor/editor.md)

27
uidoc/detailed/text_input/finetuning_number_editor.md

@ -1,2 +1,29 @@
# finetuning_number_editor
## 数值微调器
{% method %}
[source](https://jsfiddle.net/fineui/52dhwtfz/)
{% common %}
```javascript
BI.createWidget({
type: 'bi.fine_tuning_number_editor',
element: '#wrapper',
width: 300
});
```
{% endmethod %}
##参数
| 参数 | 说明 | 类型 | 可选值 | 默认值
| :------ |:------------- | :-----| :----|:----|
| value | 编辑框中的值,-1表示自动 | number | | -1 |
--- ---
##事件
| 事件 | 说明 |
|BI.FineTuningNumberEditor.EVENT_CONFIRM| 点击增加/减少按钮或者编辑框确定时触发 |

7
uidoc/detailed/tree/bi.multi_tree_combo.md

@ -52,6 +52,9 @@ BI.createWidget({
| getValue | 获取文本框值 | getValue() |
| populate | 更改树结构内容 | populate(items) |
##
BI.MultiTreeCombo.EVENT_CONFIRM
## 事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.MultiTreeCombo.EVENT_CONFIRM| 点击一级节点触发 |
---

1
uidoc/detailed/year_combo.md

@ -28,6 +28,7 @@ BI.createWidget({
##事件
| 事件 | 说明 |
| :------ |:------------- |
|BI.YearCombo.EVENT_CONFIRM| 选中日期或者退出编辑状态触发 |
|BI.YearCombo.EVENT_BEFORE_POPUPVIEW| 选中日期或者退出编辑状态触发 |

Loading…
Cancel
Save