diff --git a/public/js/index.js b/public/js/index.js index 3e1b3da92..a1ec73a00 100644 --- a/public/js/index.js +++ b/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": "自动" }; \ No newline at end of file diff --git a/uidoc/SUMMARY.md b/uidoc/SUMMARY.md index 048b259eb..18dc65688 100644 --- a/uidoc/SUMMARY.md +++ b/uidoc/SUMMARY.md @@ -120,7 +120,7 @@ * [all_count_pager](case/pager/all_count_pager.md) * [direction_pager](case/pager/direction_pager.md) * [calendar](case/calendar.md) -* [clipboard](case/shelter_editor.md) +* [clipboard](case/clipboard.md) * [complex_canvas](case/complex_canvas.md) * [color_chooser](case/color_chooser.md) * [segment](case/segment.md) diff --git a/uidoc/base/editor/editor.md b/uidoc/base/editor/editor.md index 1acde25d7..58902e6e0 100644 --- a/uidoc/base/editor/editor.md +++ b/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 | 输入框为空时触发 | --- diff --git a/uidoc/base/editor/multifile_editor.md b/uidoc/base/editor/multifile_editor.md index d6fadc2eb..896dfad03 100644 --- a/uidoc/base/editor/multifile_editor.md +++ b/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 | 上传结束后触发 | --- diff --git a/uidoc/base/pager.md b/uidoc/base/pager.md index cef58dbf1..b398589ab 100644 --- a/uidoc/base/pager.md +++ b/uidoc/base/pager.md @@ -58,8 +58,10 @@ BI.createWidget({ | attr | 设置属性 | key,value | | populate | | —| - - +## 事件 +| 名称 | 说明 | +| :------ |:------------- | +| BI.Pager.EVENT_AFTER_POPULATE | pager刷新完成事件 | --- diff --git a/uidoc/base/svg.md b/uidoc/base/svg.md index 24a96c4b5..a55f141e2 100644 --- a/uidoc/base/svg.md +++ b/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 - }] -}) - ``` diff --git a/uidoc/base/table/table_view.md b/uidoc/base/table/table_view.md index ac85972c0..5358d4e1f 100644 --- a/uidoc/base/table/table_view.md +++ b/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 | 滚动事件 | + +--- \ No newline at end of file diff --git a/uidoc/case/calendar.md b/uidoc/case/calendar.md index 9b28e9a33..68898c46a 100644 --- a/uidoc/case/calendar.md +++ b/uidoc/case/calendar.md @@ -1,2 +1,46 @@ -# calendar +# bi.calendar + +### 日历控件 + +{% method %} +[source](https://jsfiddle.net/fineui/4sfsaoma/) + +{% common %} +```javascript + +BI.createWidget({ + type: 'bi.calendar', + min: '1900-01-01', //最小日期 + max: '2099-12-31', //最大日期 + year: 2015, + month: 7, //7表示八月 + day: 25, +}); + +``` + +{% endmethod %} + + + +### 参数 + +| 参数 | 说明 | 类型 | 默认值 | +| ----- | ----- | ------ | ------------ | +| min | 最小日期 | string | '1900-01-01' | +| max | 最大日期 | string | '2099-12-31' | +| year | 设定的年份 | number | 2015 | +| month | 设定的月份 | number | 7 | +| day | 设定的日期 | number | 25 | + + + +### 方法 + +| 方法名 | 说明 | 参数 | +| ----------- | ------- | -------------------------- | +| isFrontDate | 是否为最小日期 | — | +| isFinalDate | 是否为最大日期 | — | +| setValue | 设置日期 | object: {year, month, day} | +| getVlaue | 获得日期 | — | diff --git a/uidoc/case/clipboard.md b/uidoc/case/clipboard.md new file mode 100644 index 000000000..e929c25c6 --- /dev/null +++ b/uidoc/case/clipboard.md @@ -0,0 +1,32 @@ +# bi.clipboard + +### 剪切板 + +{% method %} +[source](https://jsfiddle.net/fineui/kLzq99c3/) + +{% common %} +```javascript + +BI.createWidget({ + type: 'bi.clipboard', + width: 100, + height: 100, + copy: function () {}, + + afterCopy: function () {} +}); + +``` + +{% endmethod %} + + + +### 参数 + +| 参数 | 说明 | 类型 | 默认值 | +| --------- | ---------- | -------- | ---------- | +| copy | 获取需要拷贝的值 | function | BI.emptyFn | +| afterCopy | 完成拷贝后执行的方法 | function | BI.emptyFn | + diff --git a/uidoc/case/color_chooser.md b/uidoc/case/color_chooser.md index bf4cf5d40..43982aa0b 100644 --- a/uidoc/case/color_chooser.md +++ b/uidoc/case/color_chooser.md @@ -3,37 +3,29 @@ ### 选色控件 {% method %} -[source](https://jsfiddle.net/fineui/7skvd64L/) +[source](https://jsfiddle.net/fineui/z4fwweg9/) {% common %} ```javascript BI.createWidget({ - type: "bi.vertical", + type: "bi.color_chooser", element: "#wrapper", - items: [{ - type: "bi.label", - height: 30, - text: "默认风格" - }, { - type: "bi.segment", - items: [{ - text: "tab1", - value: 1, - selected: true - }, { - text: "tab2", - value: 2 - }, { - text: "tab3 disabled", - disabled: true, - value: 3 - }] - }], - hgap: 50, - vgap: 20 + width: 30, + height: 30 }); ``` -{% endmethod %} \ No newline at end of file +{% endmethod %} + + + +### 方法 + +| 方法名 | 说明 | 参数 | +| ------------- | ------ | ----- | +| isViewVisible | 判断是否显示 | — | +| setValue | 设置颜色值 | color | +| getValue | 获取颜色值 | — | + diff --git a/uidoc/case/pager/all_count_pager.md b/uidoc/case/pager/all_count_pager.md index a15870cab..b1a4ffef9 100644 --- a/uidoc/case/pager/all_count_pager.md +++ b/uidoc/case/pager/all_count_pager.md @@ -1,2 +1,47 @@ -# all_count_pager +# bi.all_count_pager + +### 有总页数和总行数的分页控件 + +{% method %} +[source](https://jsfiddle.net/fineui/cmtamo5L/) + +{% common %} +```javascript + +BI.createWidget({ + type: 'bi.all_count_pager', + height: 30, + pages: 10, //必选项 + curr: 1, + count: 1, +}); + +``` + +{% endmethod %} + +### 参数 + +| 参数 | 说明 | 类型 | 默认值 | +| ------ | ---- | ------ | ---- | +| height | 控件高度 | number | 30 | +| pages | 总页数 | number | 1 | +| curr | 当前页 | number | 1 | +| count | 总行数 | number | 1 | + + + +### 方法 + +| 方法名 | 说明 | 参数 | +| --------------- | -------- | ---------- | +| setAllPages | 设置总页数 | v | +| setValue | 设置当前页码 | v | +| setVPage | 设置当前页码 | v | +| setCount | 设置计数 | count | +| getCurrentPage | 获取当前页码 | — | +| hasPrev | 是否有前一页 | — | +| hasNext | 是否有后一页 | — | +| setPagerVisible | 设置页码是否可见 | true/false | +| populate | 清空内容 | — | diff --git a/uidoc/case/pager/direction_pager.md b/uidoc/case/pager/direction_pager.md index 8d79c65ec..7fa793da9 100644 --- a/uidoc/case/pager/direction_pager.md +++ b/uidoc/case/pager/direction_pager.md @@ -1,2 +1,64 @@ -# direction_pager +# bi.direction_pager + +### 显示页码的分页控件 + +{% method %} +[source](https://jsfiddle.net/fineui/vyc36s2a/) + +{% common %} +```javascript + +var pager = BI.createWidget({ + type: 'bi.direction_pager', + height: 30, + horizontal: { + pages: 10, //必选项 + curr: 1, //初始化当前页, pages为数字时可用, + firstPage: 1, + lastPage: 10, + }, + vertical: { + pages: 10, //必选项 + curr: 1, //初始化当前页, pages为数字时可用, + firstPage: 1, + lastPage: 10, + }, + element: 'body', +}); + +``` + +{% endmethod %} + +### 参数 + +| 参数 | 二级参数 | 说明 | 类型 | 默认值 | +| ---------- | --------- | ---------------------- | --------------- | ---------- | +| height | | 控件高度 | number | 30 | +| horizontal | | 横向翻页设置 | object | — | +| | pages | 总页数 | number/bool | false | +| | curr | 当前页, pages为数字时可用 | number | 1 | +| | hasPrev | 判断是否有前一页的方法 | function | BI.emptyFn | +| | hasNext | 判断是否有后一页的方法 | function | BI.emptyFn | +| | firstPage | 第一页 | number | 1 | +| | lastPage | 最后一页 | number/function | BI.emptyFn | +| vertical | | 纵向翻页设置,参数与horizontal相同 | object | — | + + + +### 方法 + +| 方法名 | 说明 | 参数 | +| ---------------- | ---------- | ---- | +| getVPage | 获取纵向页码 | — | +| getHPage | 获取水平向页码 | — | +| setVPage | 获取纵向页码 | v | +| setHPage | 获取水平向页码 | v | +| hasVNext | 纵向坐标是否有下一页 | — | +| hasHNext | 横向坐标是否有下一页 | — | +| hasVPrev | 纵向坐标是否有上一页 | — | +| hasHPrev | 横向坐标是否有上一页 | — | +| setHPagerVisible | 设置横向分页键可见 | — | +| setVPagerVisible | 设置纵向分页键可见 | — | +| populate | 清空内容 | — | diff --git a/uidoc/core/abstract/button_group.md b/uidoc/core/abstract/button_group.md index 71a8f8bb9..ba630b45e 100644 --- a/uidoc/core/abstract/button_group.md +++ b/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: { diff --git a/uidoc/core/abstract/button_tree.md b/uidoc/core/abstract/button_tree.md index c26c87cf3..0e3cf8eb6 100644 --- a/uidoc/core/abstract/button_tree.md +++ b/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 }] }) ``` diff --git a/uidoc/core/abstract/collection_view.md b/uidoc/core/abstract/collection_view.md index c62d910cf..bfcaeb4fa 100644 --- a/uidoc/core/abstract/collection_view.md +++ b/uidoc/core/abstract/collection_view.md @@ -61,6 +61,10 @@ BI.createWidget({ | populate | 刷新列表 | items | +## 事件 +| 事件 | 说明 | 回调参数 | +| :------ |:------------- |:------------------------| +|BI.GridView.EVENT_SCROLL| 滚动时触发的事件 | {scrollLeft: scrollLeft, scrollTop: scrollTop} | --- diff --git a/uidoc/core/abstract/custom_tree.md b/uidoc/core/abstract/custom_tree.md index 53e0b461d..903cd6f01 100644 --- a/uidoc/core/abstract/custom_tree.md +++ b/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 + }] }); diff --git a/uidoc/core/abstract/grid_view.md b/uidoc/core/abstract/grid_view.md index 1ae69d237..367e117ed 100644 --- a/uidoc/core/abstract/grid_view.md +++ b/uidoc/core/abstract/grid_view.md @@ -67,7 +67,10 @@ BI.createWidget({ | restore | 还原列表设置 | — | | populate | 刷新列表 | items | - +## 事件 +| 事件 | 说明 | 回调参数 +| :------ |:------------- |:----------| +|BI.CollectionView.EVENT_SCROLL| 滚动时触发的事件 | {scrollLeft: scrollLeft, scrollTop: scrollTop} | --- diff --git a/uidoc/core/abstract/virtual_list.md b/uidoc/core/abstract/virtual_list.md index dbcf2f4be..5024b6e70 100644 --- a/uidoc/core/abstract/virtual_list.md +++ b/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, diff --git a/uidoc/core/combination/bi.combo.md b/uidoc/core/combination/bi.combo.md index 37c82c36f..fc9f7686c 100644 --- a/uidoc/core/combination/bi.combo.md +++ b/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 | 下拉列表收起后触发 | --- diff --git a/uidoc/core/combination/bi.expander.md b/uidoc/core/combination/bi.expander.md index b30d681f1..fcad420df 100644 --- a/uidoc/core/combination/bi.expander.md +++ b/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 | 下拉列表收起后触发 | --- diff --git a/uidoc/core/combination/searcher.md b/uidoc/core/combination/searcher.md index 2bccff8a4..04c522135 100644 --- a/uidoc/core/combination/searcher.md +++ b/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 }) @@ -104,7 +87,15 @@ BI.createWidget({ | EVENT_SEARCHING | 搜索中| —| | EVENT_AFTER_INIT | 初始化之后 | —| - +## 事件 +| 事件 | 说明 | +| :------ |:------------- | +|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 | 搜索结果面板初始化完成后触发 | --- diff --git a/uidoc/detailed/combo/single_tree_combo.md b/uidoc/detailed/combo/single_tree_combo.md index b28e14773..fa5cc5c17 100644 --- a/uidoc/detailed/combo/single_tree_combo.md +++ b/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) + +--- + diff --git a/uidoc/detailed/date/custom_date_time.md b/uidoc/detailed/date/custom_date_time.md index 8630f7895..4e216cf32 100644 --- a/uidoc/detailed/date/custom_date_time.md +++ b/uidoc/detailed/date/custom_date_time.md @@ -20,3 +20,11 @@ BI.createWidget({ | 参数 | 说明 | 类型 | 可选值 | 默认值 | :------ |:------------- | :-----| :----|:----| --- --- + +##事件 +| 事件 | 说明 | +| :------ |:------------- | +| BI.CustomDateTimeCombo.EVENT_CANCEL| 点击取消触发 | +| BI.CustomDateTimeCombo.EVENT_CONFIRM| 点击确认触发 | + +--- diff --git a/uidoc/detailed/date/year_month_combo.md b/uidoc/detailed/date/year_month_combo.md index 49a7b820a..db6e015c4 100644 --- a/uidoc/detailed/date/year_month_combo.md +++ b/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| | | ---- --- \ No newline at end of file +--- --- + +##事件 +| 事件 | 说明 | +| :------ |:------------- | +| BI.YearMonthCombo.EVENT_BEFORE_POPUPVIEW | 弹出框弹出前触发 | +| BI.YearMonthCombo.EVENT_CONFIRM| 点击确认触发 | + +--- \ No newline at end of file diff --git a/uidoc/detailed/date/year_quarter_combo.md b/uidoc/detailed/date/year_quarter_combo.md index 3a1bd4722..1f567ab3d 100644 --- a/uidoc/detailed/date/year_quarter_combo.md +++ b/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| | | ---- --- \ No newline at end of file +--- --- + + +##事件 +| 事件 | 说明 | +| :------ |:------------- | +| BI.YearQuarterCombo.EVENT_BEFORE_POPUPVIEW | 弹出框弹出前触发 | +| BI.YearQuarterCombo.EVENT_CONFIRM| 点击确认触发 | + +--- \ No newline at end of file diff --git a/uidoc/detailed/down_list_combo.md b/uidoc/detailed/down_list_combo.md index 51df3bca4..3fecd531c 100644 --- a/uidoc/detailed/down_list_combo.md +++ b/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| 下拉列表弹出前触发 | diff --git a/uidoc/detailed/month_combo.md b/uidoc/detailed/month_combo.md index d68b9393a..761c466d6 100644 --- a/uidoc/detailed/month_combo.md +++ b/uidoc/detailed/month_combo.md @@ -26,6 +26,7 @@ BI.createWidget({ ##事件 | 事件 | 说明 | +| :------ |:------------- | |BI.MonthCombo.EVENT_CONFIRM| 选中日期或者退出编辑状态触发 | |BI.MonthCombo.EVENT_BEFORE_POPUPVIEW| 选中日期或者退出编辑状态触发 | diff --git a/uidoc/detailed/multi_select_combo.md b/uidoc/detailed/multi_select_combo.md index 478d1fad3..dd98755f4 100644 --- a/uidoc/detailed/multi_select_combo.md +++ b/uidoc/detailed/multi_select_combo.md @@ -32,4 +32,5 @@ BI.createWidget({ | ---------------------------- | ---------------- | ------------------------------------ | | | 事件 | 说明 | +| :------ |:------------- | |BI.MultiSelectCombo.EVENT_CONFIRM| 点击确定触发 | \ No newline at end of file diff --git a/uidoc/detailed/numeric_interval.md b/uidoc/detailed/numeric_interval.md index ccdaa2085..5ef454eda 100644 --- a/uidoc/detailed/numeric_interval.md +++ b/uidoc/detailed/numeric_interval.md @@ -37,5 +37,6 @@ BI.createWidget({ ##事件 | 事件 | 说明 | +| :------ |:------------- | |BI.NumericalInterval.EVENT_VALID| 区间合法的状态事件 | |BI.NumericalInterval.EVENT_ERROR| 区间不合法的状态事件 | \ No newline at end of file diff --git a/uidoc/detailed/quarter_combo.md b/uidoc/detailed/quarter_combo.md index 28a49afef..6ebae4aa1 100644 --- a/uidoc/detailed/quarter_combo.md +++ b/uidoc/detailed/quarter_combo.md @@ -26,5 +26,6 @@ BI.createWidget({ ##事件 | 事件 | 说明 | +| :------ |:------------- | |BI.QuarterCombo.EVENT_CONFIRM| 选中日期或者退出编辑状态触发 | |BI.QuarterCombo.EVENT_BEFORE_POPUPVIEW| 选中日期或者退出编辑状态触发 | \ No newline at end of file diff --git a/uidoc/detailed/table/bi.preview_table.md b/uidoc/detailed/table/bi.preview_table.md index 4325fc1dd..322f3b5c1 100644 --- a/uidoc/detailed/table/bi.preview_table.md +++ b/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: "第一行第三列" + }]] }); ``` diff --git a/uidoc/detailed/table/bi.responsive_table.md b/uidoc/detailed/table/bi.responsive_table.md index 22987c498..5aecd8e2b 100644 --- a/uidoc/detailed/table/bi.responsive_table.md +++ b/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' }); ``` diff --git a/uidoc/detailed/text_input/bi.clear_editor.md b/uidoc/detailed/text_input/bi.clear_editor.md index ea2729dbd..a13807abb 100644 --- a/uidoc/detailed/text_input/bi.clear_editor.md +++ b/uidoc/detailed/text_input/bi.clear_editor.md @@ -40,3 +40,12 @@ BI.createWidget({ --- --- +## 事件 +| 事件 | 说明 | +| :------ |:------------- | +|BI.ClearEditor.EVENT_CLEAR| 点击清空按钮触发 | +--- + +其他事件详见[Input](../../base/editor/editor.md) + + diff --git a/uidoc/detailed/text_input/bi.search_editor.md b/uidoc/detailed/text_input/bi.search_editor.md index 29bae8661..d8ba9ea54 100644 --- a/uidoc/detailed/text_input/bi.search_editor.md +++ b/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) + diff --git a/uidoc/detailed/text_input/bi.text_editor.md b/uidoc/detailed/text_input/bi.text_editor.md index bf2ba48d0..507d733e4 100644 --- a/uidoc/detailed/text_input/bi.text_editor.md +++ b/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) diff --git a/uidoc/detailed/text_input/finetuning_number_editor.md b/uidoc/detailed/text_input/finetuning_number_editor.md index 7ecf9cab0..6e93db8b8 100644 --- a/uidoc/detailed/text_input/finetuning_number_editor.md +++ b/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| 点击增加/减少按钮或者编辑框确定时触发 | \ No newline at end of file diff --git a/uidoc/detailed/tree/bi.multi_tree_combo.md b/uidoc/detailed/tree/bi.multi_tree_combo.md index 3b94bd7b9..864c80c4d 100644 --- a/uidoc/detailed/tree/bi.multi_tree_combo.md +++ b/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| 点击一级节点触发 | +--- diff --git a/uidoc/detailed/year_combo.md b/uidoc/detailed/year_combo.md index b839bb716..bfb22129a 100644 --- a/uidoc/detailed/year_combo.md +++ b/uidoc/detailed/year_combo.md @@ -28,6 +28,7 @@ BI.createWidget({ ##事件 | 事件 | 说明 | +| :------ |:------------- | |BI.YearCombo.EVENT_CONFIRM| 选中日期或者退出编辑状态触发 | |BI.YearCombo.EVENT_BEFORE_POPUPVIEW| 选中日期或者退出编辑状态触发 |